It’s mostly a matter of preference. Having a lot of things going on in the update function can make it difficult to sort through for anyone else looking at it, or even you if you don’t visit that script for awhile. As a general rule of thumb you want to keep as little as possible in the actual update function. That being said, especially if you are new to coding, focusing on these types of optimizations can get to be a little discouraging as you start to pour a bunch of time to things that don’t visually or functionally change anything in your game.
At least from a personal standpoint, I would encourage new developers to just get things working first and then optimize afterward.
If I were to do something like an FPS, I would personally have separate functions for the different states of my player and update some sort of variable which changes the specific movement/action script that s called in update. That way if something needed an adjustment, I would know exactly what area of the script I need to look inside of, instead of having to sift through all of the code in update every time I need to change something.