My 2015 iMac 21.5" Retina runs beautifully on macOS Monterey. I now have an internal SSD, but with an external SSD as boot drive it still ran far better than the original old HDD. It's now our backup Mac for our two 2020 27" models
2015 is no where near too old to work with, you just have to learn what to do then methodically go about doing it.
Of course if there is some sort of physical damage, that has to be dealt with first.
At this point what's the harm trying? You've already conceded it's a lost cause so there will be no harm no foul:
Create a bootable installer for macOS - Apple Support
Or you might want to try to reinstall the OS from recovery: How to reinstall macOS - Apple Support
Page down to "Reinstall macOS from macOS Recovery"