For cantrips the stat used for the attack roll depends on the source of the spell.
High elf and high-half racial ability and wizards, arcane tricksters and eldritch knights use INT.
Bards, warlocks, sorcerers, paladins use CHA.
Druids, clerics, rangers use WIS.
In BG3
Magical items that...