Formally speaking, cantrips are not recorded in your spell book at all; they're simple rote-memorised weavings that you don't need a reference for. The latest updates to 5e allow a limited degree of cantrip swapping for most classes, even though Tasha's final rendition of it was disappointing... the idea being that with some time, you can sit down and fix a different cantrip in your "nearly-thoughtless" head space, but you can still only keep so many of them floating around there.