I meant some kind of an infostealer that pulls out cookie sessions and maybe passwords from the browsers
The answer is again pretty easy. Don't install anything like that. Stick to reputable software from reputable sources and you have very, very good odds of never coming in contact with malware. That and your browser is sandboxed these days. So, there would need to be a whole chain of exploits for this sort of stuff to be something that keeps me up at night.
(No, you're not going to be hit with malware from visiting 'dodgy' sites. Not these days and it's even less likely with Linux.)
The permissions system helps keep you safe. You first need the password to set the executable bit and you must have permission to do so. This sort of stuff helps a great deal at keeping you secure. You just have to use those tools to your advantage.
I usually spend some time researching before installing anything - and I install all sorts of stupid stuff.
If I've installed something without a lot of background information, I tend to let it run for a while while watching for strange behavior and I'll also take a look at what's happening on the network to see if it's calling home or making any unusual requests.
But, I don't really worry too much about it most of the time. I only put that much effort in when I have a reason to do so.
Your best security tool is in between your ears.
Your worst security tool is sitting in your seat.
We are our own worst enemies, I suppose. Still, be cognizant and prudent in your computational decisions. Being alert is likely to be your best asset. You should be able to (reasonably) understand everything your computer is doing. If it's doing something you don't recognize, find out what it is doing.
For example...
Look in your running processes list and make sure you can identify all of them, for example. If you see a running process that you don't understand, look it up online. Odds are that it's a harmless background process (or similar) but look it up and confirm that.
Assuming I'm home, I don't have much to worry about regarding that evil maid. I do lock my devices if the house is going to be empty. I don't worry about my guests too much 'cause they don't know anything about Linux.