iMac 2013 running so slow it's almost unusable
I have an iMac from early 2013 and recently it has become very slow to boot up and even slower to operate afterwards - opening safari [for example] takes about 10 minutes but any selection of software/apps takes the same amount of time - I've cleared the cache/cookies - I've run diagnostics in file utility - deleted unused apps etc to no avail. It has 8GB of RAM [of which 6GB is showing as used before I open any apps so that's just with the OS I guess - Mojave] and the memory pressure is orange - 70% of my 1TB HD is free, my CPU shows as 5% usage in the activity monitor so I'm lost as to what to do. I have Avast AV software, the free version, but as it's been there for 4 years I tempted to think this is not the root cause of the problem even if it is doing nothing in reality to protect my Mac. The local repair shop suggested I change the HD for SSD but having not even spent 1 minute to look at the problem I'm tempted to think that whilst it would improve speed it isn't the real problem. Thanks in advance for any suggestions
iMac 21.5″, macOS 10.14