first you need to determine what type of node will this ball be
it looks like it has to be rigidbody2d for me,
if it’s rigidbody2d, then you can use freeze function and make it as a child of the player, and when you pressed SPACE, it will unfreeze the ball and you can add “push” power to it after reparent it back to world space
here someone done it in 3d, it’s “sticking” to player when the player is holding the ball
sadly the project file now is now deleted on this post, so you cant test it right away