The Magicians Of Caprona by Diana Wynne Jones

In a small Italianate city whose peace depends on a fragile, family-held magic, bitterly rival houses of magicians find their feud tearing the town apart when an old protection is broken and a dangerous curse is unleashed. Two young members of the feuding families must put aside inherited hatred, unravel a lost spellbook, and, with the reluctant help of a powerful enchanter, restore the city’s protections before Caprona is ruined—learning courage, cooperation, and the true meaning of power along the way.

Purchase from Bookshop.org