Spells are a bit of a different case, as there is almost never uncertainty that the approach (the execution of the particular components of the spell) will achieve the goal (producing the effects of the spell). Generally, it is certain to succeed, unless you are in an antimagic field or something, in which case it is certain to fail. Counterspell can make a spellcasting action’s outcome uncertain, if the spell being cast is a higher level than the counterspell. Once the effect is produced, sometimes the target(s) have a chance to avoid its effects, so they make a saving throw. Sometimes it’s uncertain if a spell will hit its target, so you make a spell attack roll.