There’s an art to muting the strings you’re not using, and making it second nature (part of the unconscious mechanics of your playing). For higher/thinner strings, you can use the flesh of your fretting fingers. In this case, the #1/pointer finger can gently touch the G string to dampen it when you use it to play the E on the #4/D string.
The picking hand palm can also be articulated to assist with muting as well. Find your best comfort areas when practicing slowly, and incorporate them into your mechanics with EVERYTHING you do, and eventually, you won’t even have to think about it – you’ll just “auto-mute” what you don’t want playing. This will come in handy when you get to sweeps!