1) Online, random maps, all spells allowed. Here, of course, whoever learns Town Portal and Flight or Dimension Door first will win, so earth and air magic are a must-have;
2) Online, random maps, control spells are prohibited: see below after point 4;
3) Offline, i.e., playing against the AI, on random maps or strategic maps where all spells are allowed: see point 1;
4) Offline, i.e., playing against the AI, on custom maps - strategic or RPG, where there are certain restrictions: here, everything depends on the specific map.
In general, if possible, it is worth learning earth, water, and fire magic; air is also useful, but not as critical (in combat): haste, counterspell, destructive ray (it is rarely remembered, but it is a super spell, because its effect is amplified by repetition, it cannot be healed, and it cannot be removed with dispel!)...
And in general, when you have more experience, you will start to feel for yourself which schools of magic are more useful in different situations.
(Василь Симоненко. Люди – прекрасні)