Steady Aim states:
As a bonus action, you give yourself advantage on your next attack roll on the current turn…
Anything requiring an attack roll is an attack as stated on page 194 of the PHB:
If there’s ever any question whether something you’re doing counts as an attack, the rule is simple: if you’re making an attack roll, you’re making an attack.
This includes spells that require an attack roll and there’s nothing in Steady Aim’s description to exclude spell attacks. If the spell doesn’t require an attack roll though then the answer is no, you can’t use Steady Aim with that spell.