Any class in particular you’re looking for? It might be hard to give advice that’s super general for all classes. Are you building the character with point buy, or standard array of stats, or rolling for it?
In general, the D&D players’ handbook (or, I guess, the video game?) when describing the class tells you what the most important stat for that class is. E.g. Intelligence for wizards, Wisdom for druids, dexterity for rogues. Some classes rely on two main stats; e.g. barbarian probably needs STR and CON, fighter can either do CON and STR or CON and DEX. Pick a race to go with the class, one that increases the stats you care about by 1 or 2. Make sure those stats are decently high to start. E.g. after racial bonuses, your top 2 most important stats should be at least 16 and 14 if using standard array.
If you’re optimizing with point buy instead of using standard array, it’s possible to do better; I think with point buy you could either get a starting stat to 18 (after racial bonuses) or get two starting stats up to 16, at the expense of having more dump stats at -1 or +0.
If you’re looking for a safe build, don’t multiclass. You can’t really go too wrong by going single-class and then picking a subclass, there shouldn’t be any “trap” choices.
Other than that, lots of things are class-dependent. If you’ve got just one primary stat you care about, later on in levels it’s important to get it up to 20 ASAP. Other characters are more flexible and should detour for some feats. Etc.
5e really feels pretty idiot-proof to me, if you do the obvious things you’ll end up with a pretty good character IMO.
Hmm, good question, also interested!