Disclosure: I run a small Android app studio (ONLYAPPS). Nothing below needs an app and I'm not linking to anything. These steps come from Google's Chromecast help pages (support.google.com/chromecast/answer/6050397, /6109297, /3228332).
Same Wi-Fi network name on the phone and the TV/Chromecast, and the phone not on mobile data. Guest, hotel and shared networks can block devices from seeing each other (AP isolation), so setup can fail there.
2.4 GHz vs 5 GHz. Google's page is written around the same network name. If your router splits the bands into two names, test with the phone on the TV's name. If casting stutters, Google says to put both on the same band.
VPN off. Google doesn't list it as a cause, so treat it as a quick test.
TV on and at the home screen before you search again. Standby network behaviour differs by maker, so check the TV manual.
Is the device Cast-enabled?…