When the lock screen will have a short gray, and then the screen will be completely black

Why not directly black?
Welcome to iMore! If you're talking about your screen dimming for a short time before turning off completely, that is how Apple designed it. I like it because it allows me to still see my screen and saves battery by not keeping the display on full brightness when there's a good chance I'm not even using my phone anymore.
I don't think you know what I mean.I mean the situation in the picture.gray.png
I don't think you know what I mean.I mean the situation in the picture.View attachment 99835

That's not normal. I recommend restoring, preferably through iTunes. Hopefully that fixes your problem.

Original thread: https://forums.imore.com/threads/when-the-lock-screen-will-have-a-short-gray-and-then-the-screen-will-be-completely-black.351255/