Imported from the Apple Support Forums via the Wayback Machine 🔗
Yes, of course. Make a backup on an external drive with TimeMachine if you haven't done this already and then you can transfer your files to a new Mac, e.g. by using Migration-assistant.
Using iCloud and iCloud Drive helps you to access files on a new Mac
What to do before selling your iMac? Take care and do follow the steps on this link: HT201065