I've researched this numerous times, Miracast was built as a universal standard, its what most casting is based off of, but Google stripped it from Android with 6.0.
Some Android OEMs like Samsung still support it, while those that stick with stock or near stock don't implement it. Personally I think Google did it to push their inferior Chromecast on the market, and its one reason I refuse to own a phone with stock Android.
The LG app from the Google Play Store called LG TV Plus should do what you want. It seems like it's a workaround for the Miacast/Chromecast problem. You may have to set up Direct Connect between the TV and the phone. However you may only get screen mirroring - I have no experience of Miracast to know if that's as good as it gets.
I have an LG WebOS based smart TV and a Moto G6, but I happen to have a Chromecast Ultra plugged in to the TV so I didn't bother trying the LG app method.