You could try using a Virtual Machine on your M4 Mac. VirtualBuddy seems perfect for this (but I haven’t tried it myself). EDIT: You can’t run macOS 10.15 Catalina on your M4 (not even within a VM), but you can run macOS 12, on which in turn Xcode 12.5.1 should run.