You can try and connect the phone to the computer through its USB cable (in case it has a featured connectivity method) then start its official software and check to see if the program recognizes the phone. If it's a smartphone and you need to click on screen to enable USB while you're connecting it then the only choice remaining is to replace the cracked screen with a new one because it's the only way to connect the phone to the computer.