How can I prevent texture stretching while scaling a mesh?

thank u so much was looking for that exact video for the past couple of hours.