Since you have an iPhone, unless you have an Apple TV to screencast, you'll have to get a Lightning-to-HDMI connector like this and an extra HDMI cable (or if you rather can just unplug the one from the cable box or whatever). They look like this.
The "official" Apple version retails for about $45-49 but there are cheaper alternatives that'll give you the same desired outcome.
Amazon has one for $18,
Walmart for $13.
https://www.apple.com/shop/product/MD826AM/A/lightning-digital-av-adapter
They work pretty well but I think they have to be plugged to the phone and the HDMI wire before the TV is turned on because if you plug it in afterward, sometimes the input on the TV won't recognize it.
Apologies I didn't see this sooner. :0016: