I've really never thought about this before, so I assumed I must be doing it automatically, without even thinking… so I tried to analyse what it is I may be doing.
I normally play finger-style, rather than with a pick. With a pick you can always keep the rest of your hand ready to damp, so that's easy enough.
Finger-style, on right hand unless I'm being particularly busy, I seem to have a natural resting position where I've got currently unused fingers &/or edge of hand already on the unused strings, keeping general sympathetic vibration down.
I also seem to keep a 'spare' finger behind the currently played note, so as I lift I have two in place to damp. I also seem to favour resting any 'spare flesh' across the fingerboard, just touching any string I'm not playing right now.
It seems that this resting covers the top strings with the fretting hand & the bottom strings with the picking hand a good proportion of the time, without much further trickery.
If I'm paying with enough agility that I can't keep up this almost constant damping redundancy, I find I will slide the fretting finger back half an inch as I lift, so it drops to a non-resonant position.
I was really concentrating by this time, so it was feeling a tad unnatural. I think I may only do this once I start to feel a harmonic starting to escape, or in a track I'm already aware it can.
I'm not concentrating on any of this under normal circumstances - it just happens - & it took me quite a while to spot what it was that I was doing. Heisenberg's principal - the more closely you examine something, the more it affects the result.
I'm also not doing "all of this, all of the time" just whichever bits I've got time for, if you see what I mean.
I honestly didn't realise I do all this until you made me look ;)