So the best thing to do is to let go of this machine or replace the HDD and install newer version of windows?
Let it go unless you like computer diagnostics. What would you use it for? It's too old for a reliable backup. It won't run Windows 11 because it doesn't have a TPM enabled processor and Windows 10 end-of-life is a short 32 months from now, Oct. 14, 2025, in which it will again become a boat anchor. Even if is used as a backup using the existing Windows 7 (assuming a new battery fixes it), it will still be connected to the router which is connected to the internet and will always be a security risk. No more security updates for Windows 7, that OS has been so picked over in the last 10 years that it might only last minutes before it is hacked. The free Windows 7 to Windows 10 update may still be available.
Have you ever taken a hard drive apart? Not to fix, just apart. They are very cool looking inside. Take the rest of it to a computer recycler, they will get it running with a used hard drive and donate it to a needy family.