Is a goal scored if a goalkeeper holding the ball enters the goal, but keeps the ball out of the goal?
No goal. This is a basic rule of football: it's the position of the ball that matters, not the players.
Specifically quoting from the Laws of the Game, Law 10 - The Method of Scoring (page 35):
A goal is scored when the whole of the ball passes over the goal line, between the goalposts and under the crossbar
(my emphasis). In your example, the whole of the ball has not crossed the goal line, so no goal is scored.
Even if the goalkeeper is standing inside the goal post, as long as the ball has not crossed the goal line it is not a goal / if the ball in the keepers hand immediately while saving a shot and his legs or one leg is inside the goal, no goal if ball has not crossed goal line.
Goal wont be scored if goalkeeper is standing in goal holding the ball but his hands should not be inside goal even in air if the ball crosses the line even in air it will be considered as a goal