Chosen Solution

When I hold down the power button the logo shows for a couple second the it turns back off I have tried everything like resetting it and stuff. Also when I press down on the screen it makes a clicking sound like it’s popped out and won’t go back in

Have you tried with charger plugged in to see if Apple logo dissapears immediately after unplug? If it does that then battery needs to be replaced.

Try putting into recovery mode, when it is off plug it into the charger and press and home button at the sam e time until a logo appears with a cable and a iTunes logo. Then itune should recognize it as recovery mode and try to restore it. If it shows an error, say what the error code is.