Unless you want be a deep gnome, or happen to be in a Ravnica or Eberron campaign, you need to work with your DM.
No spellcasting class gets access to 3rd level spells earlier than 5th level. There are three character options that can provide access to nondetection without having to multi class for it. The Svirfneblin Magic feat available to deep gnomes at 4th level allows you to cast nondetection at will. Additionally, the Dimir Operative background from Guildmaster’s Guide to Ravnica adds it to your spell list, as does being a Mark of Detection half elf (Eberron race).
Given these things, I would just recommend asking your DM if you can add it to your spell list. The Dungeon Master’s Guide gives some guidance for this:
Modifying a class’s spell list usually has little effect on a character’s power but can change the flavor of a class significantly. In your world, paladins might not swear their oaths to ideals, but instead swear fealty to powerful sorcerers. To capture this story concept, you could build a new paladin spell list with spells meant to protect their masters, drawn from the sorcerer or wizard lists. Suddenly, the paladin feels like a different class.
Be cautious when changing the warlock spell list. Since warlocks regain their spell slots after a short rest, they have the potential to use certain spells more times in a day than other classes do.
I don’t think this change will be an issue for warlocks, as there are already official character options that add nondetection to the warlock spell list, and one that lets you cast it at will.
The only non-artifact magic item providing the desired protection against divination is the Amulet of Proof against Detection and Location, and since magic item acquisition is totally within the purview of the DM, you’re still left with “work with your DM”.