The safest OS is the one you don't run. In other words if you want a perfect OS then don't use a computer.
Now I'm guessing you want to use a computer, probably to run programs. So your choice of programs will limit your choice of OS.
For example, DOS is likely the most secure (since it contains neither networking or USB support.) But I'm guessing the programs you likely want to run don't work on DOS.
A computer disconnected from any network has fewer attack points than one that is. A computer behind a firewall which blocks incoming connections is more secure than one that isn't.
your question is thus inadequately defined for a useful answer. You need to better describe your context - what you plan to use the computer for, whether the boot drive is read-only, and so on.