So, when you decrease the length of a guitar string, it will vibrate faster and produce a higher note.
Here's a more detailed explanation:
When you pluck a guitar string, it starts to vibrate. The vibrations are caused by the string being pulled back from its resting position and then released. The frequency of the vibrations determines the pitch of the note that is produced. The faster the vibrations, the higher the pitch.
The length of a string also affects its frequency of vibrations. A shorter string will vibrate faster than a longer string, all other factors being equal. This is because the shorter string has less mass to move back and forth.
So, if you want to produce a higher note, you can decrease the length of the guitar string.