The statement, "Prevention is better than cure", refers to the fact that it is better to prevent a computer from getting a virus than to try and remove a virus from a computer.
This statement is true because if a computer gets a virus, it is possible that sensitive information can be stolen or leaked, important documents can be deleted, or the computer can be permanently damaged. In that case, even if the virus is removed, there is unrecoverable damage. However, none of this can happen if the computer never gets a virus.
A popular preventative measure on your computer is antivirus software, which monitors the activity of websites, apps, and files on your computer to determine if any of them might be viruses and tries to stop them before any damage occurs.