Arduino Uno Board Voltage Error

I think my explanation was insufficient.

First of all, the reason why I set INPUT_PULLUP is that I will use the button for the way the power flows.
Also, the results were the same even if it was set as INPUT.

And the reason I used the code 'constrain (10, 0, 180, 150, 600), 150, 600;' is because there are not many examples of servomotor drivers in Korean, so I followed the most basic example.
The example with the above code was a code that adjusted the angle according to the user's input.
"175" is the code that I checked if I could use instead of the above code.

Serial monitor results vary from time to time.
Literally random numbers appear on the monitor.
The results I just ran were 5, 2, 9, 6, 1, 5, 2, 9, 6, 1.