If the sensor for the touch screen is broken is there anything I can do or do I have to buy a new phone? to clarify, the screen lights up and if I shake my phone the camera screen comes up but I can not select anything. The phone is a Moto X play.
If that won't fix it then if you have had it for less than a year you can use the warranty to get it fixed. They'll determine if it wa your fault or not of course. Beyond one year it's out of your pocket unfortunately.