A 2018 Samsung 7-series UHD TV should be able to receive AirPlay streams by itself, when AirPlay receiving has been activated in the TV settings. How to stream from an iPhone using AirPlay 2 - Samsung Support (similar for streaming from Mac). Settings (All Settings)﹥General﹥Apple AirPlay Settings﹥AirPlay﹥On|Off.
The YouTube app on mobile does AirPlay and other streaming protocols in the same UI function, so that could use Chromecast instead, without the user realizing that. It may not be AirPlay.
The source file needs to be QuickTime compatible, AirPlay compatible, AND Samsung compatible for ‘basic AirPlay’ (not screen mirroring) to work. Your best bet is an .mp4 file with H.264 video and AAC audio. Convert if needed.
Use AirPlay to stream what’s on your Mac to an HDTV - Apple Support (screen mirroring)
Use AirPlay to stream video or mirror the screen of your iPhone, iPad, or iPod touch - Apple Support
If screen mirroring or streaming isn't working on your AirPlay-compatible device - Apple Support
AirPlay system requirements - Apple Support
Use in-app AirPlay settings in QuickTime Player, the TV app, or web video in the Safari browser.
