UV unwrap is the way to go.
Once the UVs are unwrapped the texture will be mapped to the UV map, then moving the vertices in edit mode will stretch the texture but won’t change the UV map.
Use the UV output on the texture coordinate node.
Note: You’ll need to add the image in the UV Editor and adjust the UV’s to the image as a starting point.