“Microsoft isn’t evil, they just make really crappy operating systems.“Linus Torvalds
Linux out of the box is reasonably secure. I use the term reasonably secure because anyone who thinks their system is 100% percent secure is lying to himself.
The best way to be secure is disconnect from the internet but that is usually not an optipon, (especially for a server). Below is a detailed video course you can watch about securing Linux.