I have a potentially unhealthy relationship with magic users in D&D. I mentioned in the Razorwitch post that tend to stick to three main classes: Warlocks, Wizards, and Sorcerers. I can't help it. There's not enough (or any) magic in the real world, so I need to get my fill elsewhere. As a result, I'm normally trying to find a way to get as much magic as I can in whatever classes I build.
If you're not a Wizard, there's a good chance you don't have enough cantrips. And if you're like me, that's still not enough. (I had one Wizard multiclass with Sorcerer and use one of my options below to have a lot of cantrips. Fun.)
There's a few options out there, and at least one for just about everyone.
Be born with them
This is my least used method, but it works in a pinch. For instance, my DM ran a one shot set in the past of the world of our main campaign. I, for once, didn't play a spellcaster. Instead, I played an Inquisitor Rogue. (Btw, omg, SO FUN!) But — being the metagamer I am — knew we needed a light source. So I made this character a High Elf and took the Light cantrip. Easy peasy.
Mostly High Elf, as you can choose the cantrip, but the occasional subrace provides alternatives, such as dancing lights or minor illusion. This also applies to Half Elves, though not the default one.
The default just has Thaumaturgy but a few of the others have alternatives such as mage hand and minor illusion.
Fire Genasi get Control Fire and Water Genasi get Shape Water. I'm not sure why the other two didn't get their respective elemental cantrips (Gust or Mold Earth), but oh well.
Light is the only cantrip some of these subraces get, but it's still a useful one nonetheless!
Honorable Mention: Human (Variant)
But only because of the following method...
Master amazing feats
This is the EASIEST and I think the best way to go about it: feats. The only cost is sacrificing an ASI (Ability Score Improvement), which I'm normally okay with. I like to min-max a bit but I try to prioritize roleplaying above all.
This is the tried and true method of getting magic, period. This is probably the best option to go with: you get TWO cantrips and a 1st-level spell from a single class. That's AMAZING. When building the Razorwitch, I grabbed Booming Blade and Shocking Grasp from the Wizard spell list. I normally have to stop myself from immediately grabbing this. But now, we have some other feats that do amazing things.
This is a baby version of Magic Initiate, but it fills a different niche. If I was building another bomber that only had one type of bomb, I would go with this route. Just pick up Acid Splash or Firebolt, and flavor it appropriately. Plus there's the bonus of gaining proficiency with an artisan tool of your choice!
This is an odd one, but an option nonetheless. You get one cantrip from the bard, cleric, druid, sorcerer, warlock, or wizard spell list that requires an attack roll. I gave this to a character I made for a solo campaign, but mostly for the other benefits: ranged attack rolls ignore half- and three-quarters cover, and all ranged spell attack rolls have their range doubled. WHAT!? Snipe!
This is one of the newer feats, and it only gives you access to Mage Hand, but you can do some neat things with it. Now you can make almost any character become an Arcane Trickster (or, you can make your Arcane Trickster better!).
Honorable Mention: Eldritch Adept
This shouldn't belong on this list, but I must mention it. This feat does not give access to any actual cantrips. However, it turns Silent Image, False Life, Mage Armor, Speak with Animals, Detect Magic, and Disguise Self into cantrips. These are 1st-level spells that are suddenly turned into at-will spells! I'm currently playing a Warlock with Mask of Many Faces and Misty Visions invocations and they are the best "cantrips" ever.
On a similar note, if you're a Warlock, Pact of the Tome is probably the best way to gain more cantrips, as you can pick any three cantrips from anywhere, and they don't need to be from the same spell list! THE POTENTIAL!
Add another class to your resume
And then there's always multiclassing. Take a dip in my favorite classes, or look over your classes subclasses. For my Razorwitch, I made him into an Eldritch Knight. Rogue's have access to Arcane Trickster, and — as previously mentioned — Warlock's have Pact of the Tome. A few magical subclasses also give you additional cantrips, such as the Sorcerer's Aberrant Mind and multiple Cleric Domains.
Or, you can use your Bard's Magical Secrets to take two cantrips, cause that's your business.
The right cantrip goes a long way
I love cantrips. Can't get enough of 'em. Just remember that you don't always need to be combat-focused. Light, Shape Water, and Mending are just a few of the valuable non-damaging cantrips that can provide lots of value to your roleplay. Give them a shot in your next session.
Got any other ways I missed, like items? Let me know in the comments. I'm always open to learning more ways to get a few extra at-will spells!