Why does tightening a string raise its pitch?

Sound · Vibrating strings

For a fixed length and linear density, higher tension makes waves travel faster and raises the fundamental frequency.

Change only tension. Compare the number of cycles in the same time window or listen to the fundamental in each trial.

Model readings with the default settings
A/BTensionFundamental frequencyWave speed
A9 N167.7 Hz67.1 m/s
B25 N279.5 Hz111.8 m/s

An ideal 0.20 m string with linear density 0.002 kg/m. The tone is a synthesized fundamental, not instrument timbre or a stretching rubber band.

OpenStax · Wave Speed on a Stretched String