There can be a few reasons for the mirroring not working.
Here are a few troubleshooting guidelines to help solve the more common issues regarding how to mirror your iPhone to TV:
Ensure both your iPhone and the receiving device support AirPlay
Make sure your Wi-Fi is working and that both devices are connected to the same network
Bring your iPhone closer to the TV
Only mirror one device at a time
Restart your iPhone and TV