Remove the connection from the potentiometer to 5 V.
This is a longstanding mistake blindly copied from one "tutorial" to another and another. The circuit still works, but if you remove that connection it is easier to set the contrast.
In fact, a 10k potentiometer is the wrong value, should be 1k but if you actually connect both ends if the 10k potentiometer to negative/ ground, you will be able to adjust the contrast over an even wider span of the potentiometer again. ![]()