One of the steps in mitigation following a ransomware or other malware attack is to install your backup. This presumes that you do, in fact, have a backup.
Many solutions are available to run backups. External hard drives, cloud, etc. For your phone, the cloud is available as well as your computer.
As important is the frequency with which you backup your files and operating system. Monthly, weekly, daily or even hourly may be the best frequency for you depending on how often you create or change your data.
We have all experienced writing a document in Word when the power goes out, the battery dies or something else happens that causes the program to close only to realize that we have not saved our work and it is all gone! While that is frustrating, imagine realizing all your photos, work files, or tax documentation is gone. Forever. You can do backups manually or set up your system to do them automatically