I have a hp desktop computer.
The connector to the monitor was apparently pushed against the wall and now the connector for the monitor cable cannot be secured because the connector on the motherboard is pushed in and the screws on the cable connector cannot reach the holes on computer's connector.
Any ideas?
Are there monitor cables with longer screws?

The screws aren't essential, if the monitor cable comments then that is all you need, unless you stand the computer on an unusual angle?

What is concerning is that the motherboard connecter has been, "pushed in". That shouldn't be possible. It's an indication that your computer's motherboard maybe loose in the case. I would encourage you to investigate this. Investigating would involve removing the side panel of the case, while the computer is off and disconnected from the power. Don't touch any of the components you see inside, just tell us what you see, please.

Which model HP computer is it?

Thanks for the quick reply!
Actually it is my friend's computer.
I did look at the motherboard and all else seems stable except the vga connector is recessed from the back of the case.
I decided to get a video card and avoid the issue completely.

The motherboard's backplane has most likely become bent. It should be a simple matter to bend it back into place.

Your purchase of an add-in video card is suitable, however it is not cost effective.

The screws aren't essential, if the monitor cable comments then that is all you need, unless you stand the computer on an unusual angle?

The word "comments" there was "connects" in my handwriting, but Windows knows better... don't we know it? ;-D