There are a small number of iOS apps which can broadcast the entire iPhone screen (mirror the whole screen including the homescreen) -> Teamviewer, Microsoft Teams, RescueAssist. To do so the user will start the video recording and choose one of those apps as the broadcast receiver.
How do you write such an app? I have searched through the web and I did not find a detailed technical explanation what is required to do so.