Omarchy on iMac

After helping a family member migrate to a new computer, I found myself with an old iMac. The machine from 2017 was very slow running modern macOS, yet I have a soft spot for these all-in-one computers designed by Jony Ive and his team. Could I install Linux on it to give it a second life?