Flying Up and Down

I put flying mode in character movement, the character flies constantly, as I wanted.

But he always flies in the same plane.
And what do I need to do so that the character can fly not only to the right, left, forward, backward, but also up and down?

I don’t want to associate this with pressing any button. Perhaps, to some extent, this can be called following the camera: where the character looks, he flies there.