What helped me improve my drawing dramatically was learning to _see_. As a programmer, what you need to do is realize that there is an "subconscious abstraction subroutine" which "pre-parses" visual data, before it parses your conscious brain. Unfortunately this preparing involves a great degree of detail removal. That is why you (I, at least) are not able to repeat what is in front of you. Your subconscious has "helpfully" transformed the pear-shaped head, the slightly big oval eyes with gray irises, and that very thin upper lip into the concept "Peter's face". Drawing the face requires actually perceiving those details, in order to reproduce them. That's why children draw human bodies as stick/blob figures.
A good exercise to practice "unfiltered seeing" is:
Select an image you want to draw. We'll call this "the original". It's recommended that the original has clear borders, and few or no color. A black and white cartoon or portrait.
Try your best to replicate the outlines (borders) it on your own on a blank piece of paper. Don't bother with color just yet. This drawing is your "first attempt". Let's try a second one.
Draw a square grid on top of the original, each square edge about 10 cm.
Draw the same grid on a blank piece of paper.
Then (and this is critical) turn the original upside down! You are going to draw it upside down now.
Keeping the original upside down the whole time, and starting on the top-left square, replicate the outlines you see on the same square on the original. Use the square edges as guides; if a line in the original crosses the middle of the top edge of the square, you should try to draw a line so that it crosses your grid the in about the same point.
Once you are certain that the square is "finished", and only then, move on to the next square. Keep filling up squares, until you have filled all of them. Then turn the drawing upside down. This is "second attempt". Compare with first attempt.
The combination of upside-down and division in grids is often enough to not trigger the "visual abstraction subroutine". You may try this again with more complex pictures. In my case once I "learned to see" I experienced a high bump in my drawing abilities.
You will find that a lot of the "drawing lessons" out there really consist on learning to see reality without the abstraction filter on.
Finally, there's of course manual dexterity exercises to make you used to your drawing equipment. They make you draw straight lines, curves, merge colors, etc. I think those are usually very easily found online.
Good luck in your journey!