i cant change the sketch

hello, i just got my first arduino uno. I was just trying my very first program the blinking led, it worked just as expected.
however when i tried to do another simple sketch (a led controlled by a button) i wasnt able to make the first sketch to stop running, even after i uploaded the button sketch. i tried reseting the arduino and even changing usb ports but i dont know hy it just wont stop the blinking led sketch i did first

i wanted to know if there is something that i have to do in between sketches in order to prevent this from happening

(sorry for the really noobish question btw)

Didn't you get any error messages?
Describe what you did an what you observed.

when i try to use the button sketch i get this message

avrdude: stk500_getsync(): not in sync: resp=0x30
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

oh nvm, i had a problem with the driver, i looked it up and fixed it now.

thx for the reply anyways