That iMac is a great machine you have and it should have plenty of life left. The MBA too. As suggested by eMacMan, you can "park" it at a certain OS and maintain your hardware and software in a closed compatibility zone -OR- you may be able to install a newer OS and to remain compatible with the latest software and peripherals. To this end, a colleague of mine has used Collin's "patcher" - dosdude1's Personal Web Server - Software
- with great success, upgrading dozens of DIY CPU-upgraded Mac Pro Towers to High Sierra. However, Collin suggests that iMac12,x with AMD Radeon HD 5xxx and 6xxx series GPUs will be almost unusable when running Catalina. So check your video card.