OK, first thing is that you really need to 1) start doing disk cleanup/maintenance/repairs, from a software perspective, 2) start doing backups. For #1, taking care of a Mac is just like taking care of an automobile. Yes, Macs are reliable machines, as are cars made by Honda or Toyota. But just like an automobile, if one neglects to have maintenance performed, one is just asking for trouble. And for #2, it is essential to have a backup in case one needs to recover from a disaster.
For #1, you actually can do a good amount of disk cleanup on your own (ie, get rid of files/folders you don't need any longer, get rid of duplicate files/folders, etc.). Also, here are some excellent freeware products available that help with disk cleanup/maintenance/repairs:
Onyx - Available from here:
https://www.titanium-software.fr/en/onyx.html
Rock Solid, has been around a long, long time, and has had many positive reviews. I use it religiously (along with a commercial program entitled Tech Tool Pro). I would not be without either of them. In fact, I will not upgrade to a new Mac OS until there are compatible versions of both of them for the new OS (along with 4 other critical programs that I have). Note that there are different versions of Onyx available, for each different Mac OS. You would need to get the correct version for the Mac OS you are using..
AppCleaner - Available from here:
https://freemacsoft.net/appcleaner/
Another stellar performer! As you can see via that link, it will get rid of most stuff associated with an application that you wish to delete.
GrandPerspective - Available from here:
http://grandperspectiv.sourceforge.net/
Nifty graphical way to see which files are on your drive. Good way to identify large ones that you might not need.
Malwarebytes - Available from here:
https://www.malwarebytes.com/mac/
Good to use if you see adware and/or suspect you might have a virus. It also is good to run it every so often, even if nothing is wrong.
ClamXAv - Available from here:
https://www.clamxav.com/
More extensive than Malwarebytes in terms of finding viruses. You can use it in demo mode, and it still has just about full functionality.
Then of course you can use Disk Utility to check out your drive and/or do repairs. It's not as extensive as Tech Tool Pro (
https://www.micromat.com/products/techtool-pro), Disk Warrior (
https://www.alsoft.com/diskwarrior/?gclid=EAIaIQobChMI9qzeqcSF2gIViWp-Ch0NngwsEAAYASAAEgJg7_D_BwE), or Drive Genius (
https://www.prosofteng.com/drive-genius-mac-protection-software/), but it gets the job "mostly" done. I use Tech Tool Pro, and in fact it is the only third party one so far that is fully compatible with High Sierra (that's the OS I use on both of my Macs).
As for backups, you will first need to purchase an external drive. Next, the Mac OS comes delivered with Time Machine, which is OK for backups. But the other method is to use software that makes a
bootable backup/clone of your system. The 2 excellent products that do that are SuperDuper! (I use it), and Carbon Copy Cloner. Note that I said
bootable. Time Machine backups are not bootable. It's almost like having another computer. This thread I started back in November, along with excellent comments by others, would be good for you to read:
https://www.mac-help.com/threads/backups-backups-backups.223959/
Now, assuming you have had your iMac since 2006/2007, it is a definite possibility that the internal drive is going/has gone bad. Your choices are 1) try and diagnose the issue, and replace the internal drive, or 2) get a new machine. For #1, it is possible to get it working again, but it will take some effort to do that (you would basically use one of your laptops to analyze the iMac that is booted in "Target Disk Mode"). To do that, you will need to purchase at least one Firewire 800 cable, and possibly an adapter. If you want some guidance how to do that, you will need to let us know the
exact model designation for the iMac and the Macbook Pro (by the way, how is it running? Again, performing disk cleanup/maintenance/repairs, and doing backups, are essential tasks for that machine also).