My university's introductory CS course has us using Java. It's a web IDE within a textbook, but weirdly enough, I found it's actually just connected to an AWS instance of Ubuntu.
I myself have been daily driving since my sophomore year of high school.
I think this VM is still on Sonoma, actually. I still need to upgrade.
I can't remember exactly what I did to get an installer image, but there's a million shell scripts online for downloading macOS installer images. For booting it, I use this premade OpenCore for KVM/Proxmox. I have to check if I made other modifications (I run on an AMD CPU), but I think I mainly just had to set the serial and model - I personally used a 2019 Mac Pro.