The trouble is this has never been a thing D&D has handled well, because by 2E it was already filled with "solve virtually all non-combat problems" spells, and 3.XE/PF1 and 5E have only made this worse. Further, Wizards get to learn insane numbers of spells, and Clerics/Druids pick from a very large list, with only Sorcerers and classes working the same way as them having limits.
So characters who are good at non-combat things typically only get to shine briefly before they start getting regularly overshadowed or even in some cases entirely invalidated by casters. Especially as in 5E and older games, non-combat spells don't typically involve rolls, so are the better choice when doing anything really risky/hard too (but newer ones are moving away from this - I see Mearls' new game has spells fully able to fail and go quite wrong and so on, despite being quite close to 5E).
(Magic items get in on this too - the most effective Thief I ever saw in 2E was effectively largely because he had a Ring of Invisibility and those boots that are super-quiet, which in theory almost any PC could have.)