That type of problem is usually associated with a lens extend error.

It is usually caused by weak batteries or dropping the camera.

Keep your eye on the LCD screen when you turn the camera on.
Do you see any type of error message?

Now turn the camera on again and help the lens extend by gently pulling on the lens as it extends.
Does the camera stay on when you do that?

..