Its noted here, but I'll highlight the key note:What makes a cantrip a warlock or sorcerer one?
Multiclassing - D&D 5e (2024)

Spells Prepared. You determine what spells you can prepare for each class individually, as if you were a single-classed member of that class. If you are a level 4 Ranger / level 3 Sorcerer, for example, you can prepare five level 1 Ranger spells, and you can prepare six Sorcerer spells of level 1 or 2 (as well as four Sorcerer cantrips).
Each spell you prepare is associated with one of your classes, and you use the spellcasting ability of that class when you cast the spell.
Cantrips. If a cantrip of yours increases in power at higher levels, the increase is based on your total character level, not your level in a particular class, unless the spell says otherwise.
So the basic jist is: When you picked up a cantrip, whatever class you took that gave you the cantrip slot you used to grab it, that is the class the spell belongs to. If you did it with a warlock level, its a warlock cantrip. If its a sorc level, its a sorc cantrip.