Make sure the Samsung model is listed as a compatible option - Apple TV app - Devices - Apple (EG)
Sometimes, AirPlay might be turned off in the settings. If that’s the case, go to the TV settings and enable AirPlay.
If your TV doesn’t show up in the list, it’s likely not compatible with AirPlay 2. A streaming device could be an alternative in this scenario as mentioned by Rudegar.
Chromecast offers a relatively affordable and functional solution, although it lacks native AirPlay functionality. You’d need third-party apps for screen mirroring.
I’d recommend Roku, as many of its models support AirPlay directly.