Thank you for using Apple Support Communities.
I see that you are having an issue with the display on your iPhone going to black after a few seconds. The first thing I would check is the setting for auto-lock. To adjust this, go to Settings > Display & Brightness > Auto-Lock and see what it is set for. Adjust to a longer time or Never to see if it makes a difference.
If it doesn't make a difference, a bit more information would be useful.
1. Does this always occur after a few seconds, or does that time vary?
2. Is there a case on the iPhone? If so, have you tested the issue with the case removed?
3. Have you tried restarting your iPhone?
4. What version of iOS is on your iPhone? Could you update and test again?