1 keep all devices updated & antivirus updated
(this will include patches to help prevent viruses)
2 don't open email attachments or pop ups.
(one of the easiest ways to get infected)
3 don't run as admin user
(most malware etc. will not install on your system if your running as a normal user without admin privileges)
4 back up offline and keep backup device offline.
(If you do get infected, you can wipe your hard drive and start again with your backup nice and safe, the virus will also encrypt your backup/s if connected to your network or PC in any way, so keep separate) a complete image backup is best, it's just 10 minutes to install the whole system back to the way it was this way and worth the planning ahead.