Is there an open-source iOS screen viewer/ recorder for macOS?
You could take a look at videosnap. It is an free and open source utility that allows you to record the screen of your iOS device from a Mac.
Note that it is a command line utility you can use from the Terminal - it does not have a graphical user interface.