Then you created another "x" and gave it the value "6"
That did not mutate the original "x", it created a new, different "x". That first "x" is no longer visible in the scope of your code. This is known as "shadowing".
If you want to mutate the original "x" you would simply write the assignment "x = 6" instead.