Sony has given a great number of ways to play content from your Xperia Z4 to the Sony 4K TV.
If you want to really enjoy action packed high definition movies or happen to have 4K content, the only way is get the best experience is to use MHL. Just plug a MHL cable between the Xperia Z4 phone and the Sony 4K TV, and you automatically display your phone's screen onto the TV. No need to go through complicated setup menu's. Plus you get the extra benefit of charging your phone in the process.