Hi pike1406,
For help with the screen mirror feature, first check that your hardware meets the requirements for the feature. System requirements for Continuity on Mac, iPhone, iPad, and Apple Watch
If met, test the steps below found in the article here:
"Mirror your iPhone, iPad, or iPod touch to a TV or Mac
- Connect your iPhone, iPad, or iPod touch to the same Wi-Fi network as your Apple TV, AirPlay 2-compatible smart TV, or Mac.
- Open Control Center:On iPhone X or later or iPad with iPadOS 13 or later: Swipe down from the upper-right corner of the screen.
- On iPhone 8 or earlier or iOS 11 or earlier: Swipe up from the bottom edge of the screen.
2.Tap Screen Mirroring 
3.Select your Apple TV, AirPlay 2-compatible smart TV, or Mac from the list.
4.If an AirPlay passcode appears on your TV screen or Mac, enter the passcode on your iOS or iPadOS device."
You can also check your automatic AirPlay settings with the help of the guide here: Wirelessly stream videos and photos to Apple TV or a smart TV from iPhone
Should the issue continue, follow the steps here: If screen mirroring or streaming isn't working on your AirPlay-compatible device
Best.