Chosen Solution

Like it said on the title, my iPhone won’t turn on. I tried sleep/home button but only apple logo would turn on for 3 seconds and black screen.

If it only turned on for 3 seconds, it has nothing to do with the system itself. Probably has to do with the battery, try plugging it into a lightning cable and turning it on. If that doesn’t work, plug into iTunes hold the home button while it starts up and try to put it into recovery mode. if iTunes recognizes it then hold the home and power for 5-10 secs till you see the screen turn off and then back on again. What ios version is it on? and is it Jail broken? Sometimes a tweak could be causing it to crash on boot and you may need to boot into safe mode. depending on what ios version your on it could have a different way of getting into it. Safe-mode is something that was installed if you installed cydia substrate. If you still cant get it to boot up regularly or into safe-mode, your best option is to restore it and restore from back up either via icloud or itunes