Should I buy a mountain bike, what size should it be? My bike is becoming old and I'm upgrading. 

Where I live half the roads are offroad/gravel, half of them are really old asphalt that has pot-holes in it. I'm thinking of buying a mountain bike, because they look really cool (that's not the main reason ofc), and as I've heard they're pretty nice to ride offroad, but I'm not sure about normal road use. 

Do they need a lot of maintenance? Oh, and what size should it be? I'm 180cm which is about 5'11" for you Americans. My budget's about 200-300 euros, is that even enough for a good mountain bike that will serve me well for years?
We can't really say what kind of bike you should buy, you should buy the bike you will ride, that is the most important thing. Many (most?) people will want to have both, a road (or gravel) bike and a mountain bike. Some people will want to hove both a hardtail mountain bike and a full suspension mountains bikes. They are different machines for different purposes.

If you want to have one universal bike, a hardtail mountain bike is good for that. So is a gravel bike. The preference is really individual. No-one can make that decision for you. I have both (not at the same place) and the are of use largely overlaps.

Mountain bikes with suspension require the maintanence of the suspension system. That is the job for a bike shop for most people, it is more complex than the maintenance of bikes without suspension. It should be done regularly. There are tutorials available, but even with that most people won't want to do it themselves.

The size can really only be selected after you chose the bike model you want. Follow the manufacturer recommendation, try it if you can, ask the bike shop if you can. But when buying online I would follow the manufacturer,  you probably do not have enough free money for a bike fit. Your size will probably be medium for many bike frames (for MTB 19" or 20"). But surely not for all.