The Sony Xperia Z3+, Z4, and Z5 comes with tons of connectivity options and are more open than other smartphone brands in terms of being able to work with products from other companies.
Sony Xperia offers 3 different ways to share your screen. You can use MHL to display 1080p resolution from your Xperia directly to a HDTV. Xperia also supports wirelessly casting directly to Google Chromecast or Android TV. Finally, the Xperia supports Miracast wireless display which a larger number of TV's support including the LG 4K Ultra HD Smart TV with webOS 2.0 (2015).
To set up Miracast on the LG TV, first go to the TV's Inputs Menu and select Screen Share.
Once you select Screen Mirroring, you then need to press Start and then press OK once it asks you to Start searching for devices.
The LG TV is found relatively quickly, and after you select the TV, the screen will automatically be wirelessly mirrored from the smartphone to the TV.