Hi,
Make sure your Apple TV is up to date >> Update the software on your Apple TV
Make sure your iPhone is up to date >> Update the iOS software on your iPhone, iPad, or iPod touch - Apple Support
And help with AirPlay >> Get help with AirPlay and AirPlay Mirroring on your iPhone, iPad, or iPod touch - Apple Support