Like ritual spells, cantrips do not use a spell slot. This is so that magic users can contribute in small ways even if they run out of spell slots. A wizard might otherwise be totally useless in a fight, and that’s rarely fun for anyone.