Broken iPhone screen

My iPhone 7 recently just broke. Its not cracked but the screen just gave out and barely works so i can't put my password in. I've just decided to just give it to my cellphone carrier for cash but in order to do that I need to factory reset it. I can't due that because I'm unable to get into the phone without disabling it. I've tried using the computer but that doesn't seem to be working either.

Somebody please help!