iPhone XS the display works but not the touch
There are only two pathways to address this:

Reset your phone.  Obviously, you need to make sure you have a backup of your data.

You need to take it in for service.  The Apple employee will actually repeat step one (and inform you about making a backup as well).


The digitizer (the portion that detects touch input) has died.  Unfortunately, it's no longer a separate components, but it's now glued to the LCD (the portion that displays images).  The whole assembly will need to be replaced.
There is a possibility that the logic board malfunctioned and the digitizer and display is still good, but without opening it up and putting hands on, it's impossible to tell - you still have to take it in.