Looks to me like lines 19 and 20 are computing and assigning a Vector3 velocity with the y-velocity set to zero.
That would certainly cause this:
I also don’t understand Direction vs Direction2 but hey, if it works for you…
If you would prefer something more full-featured here is a super-basic starter prototype FPS based on Character Controller (BasicFPCC):
https://discussions.unity.com/t/855344
That one has run, walk, jump, slide, crouch… it’s crazy-nutty!!