@sumudu It’s a bit more detailed. When you see the recording mini window, look to the right of the record button, there you’ll see a disclosure triangle or a caret, I can’t recall which. Clicking on this lets you select a cable-connected iPhone or iPad as the camera. Then whatever is shown on the connected device appears on the Mac’s screen. There’s no need to actually start a recording.
This trick also works with an Apple TV, believe it or not!
Having said that, though, Reflector 3 app is much easier. https://www.airsquirrels.com/reflector
Reflector 3 offers a free 7-day trial.
// @matigo @jws