I think the to hit for spells comes from your main stat.
Int for wizards, wisdom for cleric, druid and, ranger, and charisma for sorcerer, bard and warlock.
In the description of the spell they state which stat you dnemy uses for saving throw, and that is mostly dex for the ranged evocation spells.