I've been a DM for about 3 years, and have predominantly run one-shots and short campaigns in DnD5e and PF2e. I have a player who persistently builds primary caster based characters, but then won't do anything in combat but "I stab it with my dagger." They rarely use cantrips, and basically won't cast a leveled spell unless I suggest it immediately before their turn. They seem to enjoy playing despite the fact that they're far too squishy to be a front-line melee character and don't utilize most of their class features. I've talked with them explicitly about how their play style seems to be discordant with the kind of play they want to do, and that maybe next time they should try a paladin/champion or a fighter/rougue subclass with some minor casting. They agreed at the time that sounded like a good idea, but low and behold showed up to the next one-shot with a primary caster, and over 3 hours of play and 3 combats never cast a single spell, including a cantrip.
I enjoy playing with this persons as a whole. They are engaged in the fiction, and are particularly engaged during exploration activities. They tell me they also find combat quite fun, and they are requesting I run a mega dungeon in the near future.
As a general rule, I like to let people play how they have the most fun, but issues have arisen with this play style. Namely, all of my TPKs have been associated with this player charging a squishy character directly up to a significantly stronger villain and continuing to stab it with a dagger until they went down, significantly hindering the party in the action economy and resulting in a TPK. I feel I have to intentionally weaken all of my encounters to keep the party feasible in the face of such mechanically poor combat choices.
What else can I do to help drive this individual towards melee builds, and/or help encourage them to change their play style to better suite the caster classes they choose?
Muscle wizard, go go go.