Recently I have been having problems with my 2013 late iMac. I was able to use it with no flaws until August. I was normally using the device with bootcamp. About two months ago my first problem occurred. If I log off from my windows bootcamp for more than 15 minutes the partition would just corrupt leading me to delete the partition and redownload windows. I did this many times until last week. Out of nowhere my device slowed down leading me to shut it down from the power button and for surprise i was able to open it back. But it was extremely slow, leading me to delete it again from the main partition. Then something strange occured, my main partition started to corrupt too. After trying many things I have decided to delete the disk from internet recovery (which wasn't able to open due to -2002f error but somehow worked this time) and created a new one with macOS Catalina (I was using Sierra until that point). Everything went flawless and after about 30 hours I deleted the disk and downloaded the new version. I decided to download bootcamp as usual and did that. But my problems reappeared. I was having problems with my system files whereas Program Files x86 was read only. So I have decided to delete it again and stay on macOS Catalina but now I am keep getting errors. My device is extremely slow making me wonder if my hard drive or RAM is failing. I did first aid to my device through disk utility and got errors. I tried fchk through single user mode but it didnt work, giving me different errors, I even did apple diagnostic test with command D and it gave no errors. Now Im in some kind of recovery mode where Safari is the only thing opened. It leads me to apple diagnostics html but its still trying to connect.
Note: I cant even boot into the system now, I did a PRAM reset an hour ago and now its looping on startup.
Please help me with this problem, I do not prefer to visit technical services because its pretty expensive. If its something I can do by my own, please help.
Thank you for your attention.