UIWindow
The gist
UIWindow is the root container of the view hierarchy (a UIView subclass) with no content of its own: it shows the rootViewController and delivers events. Since iOS 13 a window belongs to a scene: you create it with UIWindow(windowScene:) inside scene(_:willConnectTo:options:). An app can have several scenes (multiple windows on iPad, an external display, CarPlay), each with its own windows.
The rest of this answer, with code and interview follow-ups, is in the DevPrep app.
Read the full answer in DevPrep