This isn’t quite the lowest-spec iMac sold, but it’s one very busy 28 GB SSD Fusion cache away from lowest.
It’s out of main memory. It’s using a hard disk drive heavily within its Fusion drive, too. And as for performance, hard disks are very slow.
In aggregate, whatever apps and data doesn’t fit in main memory gets pushed out to that slow hard disk, and then pulled back in from slow hard disk. And reduces what can be cached. And the 28 GB SSD cache within the Fusion can’t mask that activity.
The Microsoft 365 (Office)and related apps and the Google apps are not lightweight.
One option that can potentially help is switching to an external SSD, as upgrading the internal storage and adding main memory is a bigger project, and substantial investment in a five year old Mac that might not be worth the costs.
This is the lowest-spec iMac:
Your iMac is hitting that hard disk heavily, too.
This is how to boot an external SSD:
It’s also possible the hard disk drive is failing, too.
Apple Diagnostics can report hard errors, but can miss transient errors:
There are other tools to check for any hard disk errors, but I’d start with the above Apple Diagnostics tool. And in the event that the hard disk is failing, the most likely response will still be to add and boot from an external SSD.
EtreCheck is not good at spotting a failing HDD in a Fusion drive, either.
You will want to get Time Machine or other backups going too, as the only way to mark data as being valuable is with backups:
And if this is failing, you’ll probably need to use that backup.
Under-purchased or overloaded with apps, depending on your preferred frame of reference.