It depends entirely on the television. My LG TV doesn't have Chromecast built in, yet I could share content to it quickly using my Samsung Galaxy Fold 2. With my Pixel, clicking the Chromecast icon within the Google Photos app returns a message that no compatible devices are found.
I'm pretty sure no LG TVs come with Chromecast built in, even recent revision OLEDs. There's a screen sharing app which has Miracast/Intel MiDi logos and has a very unhelpful and vague Android connection guide. Essentially Miracast utilises a WiFi direct connection, unlike Chromecast that uses a DIAL protocol (essentially grabs the content/connection from the internet itself after being pointed there).
Googling suggests Android has had Miracast support included since 4.2, but as I said, my Pixel Fold doesn't want anything to do with the LG TV I have (think it's a 8 series OLED).
So I can only assume Samsung not only supports Chromecast, but also supports other direct share protocols.