Windows XP SP3 with all the latest security updates, antivirus program, etc. will no longer runs acceptably with 512MB of RAM. You will need more RAM (1GB-2GB) or a new computer.
It's like trying to drive the Interstate with a Model-T Ford, i.e., just not enough power to keep up with the flow of traffic. Take it off the Interstate to untravelled roads & it will probably be acceptable.
Remove your computer from the Internet, uninstall all updates & it will run like it used to.