I got attacked by a gandcrab
Depends how you got infected? First rule, would be learning safe habits while browsing.
Piling software doesnt really help, since there arent 100% protection if the user allows malware manually
But everyone makes mistakes, its very rare case to be infected by ransomware...and incase that happens you want to have backup ( as already mentioned in this thread) , if you keep files or do working on your pc
Personaly i dont care about backups, since i have nothing on my computer that i really need and incase i do i would prefer onedrive or or any other cloud to keep copy of my cv, or something like that.
I would prefer Ransomoff, for ransomware protection + kaspersky free to have most advanced threat removal + website filter out there
Anyways you have to think what went wrong when you got infected and how you can avoid that in future
If you torrent or do use cracked software, only way to avoid this from happening is completely stop torrenting/ using illegal software as example