How do I use a rotary encoder

Hello! I'm trying to make a steering wheel and pedals game setup with my Arduino Leonardo and right now I'm making the steering wheel. I bought these rotary encoders from Hiletgo

But I'm really confused how to use them because when I spin it it the value changes to 1023 and then when I spin it again it goes to 0 and it repeats that....

Schematic?
Sketch?

You have basically said:
I have wired stuff up and it doesn't work.
For anyone to help you they will need to know how you actually wired it up and what is actually happening. Look up the forum guidelines (sticky at top of every section). It tells you how to best form a question, what information to include, how to post a picture and how to use code tags.

Do you know any good schematic websites?

How to make schematics tutorial.

The Encoder library page has good information on how encoders work and how to interface and read them.

Encoder library github page.

Playground encoder page.

Pencil and paper is just fine, but you would be well served to learn a schematic program. I like Autodesk Eagle because it's free for small boards and it easily makes PC Board files when I want to make boards.

The hardest part of using Eagle is finding the parts in the huge parts library. If you aren't making a PCB, then you have much more latitude for parts selection- a resistor schematic doesn't depend on the value or the type of part, surface (smd) or thrugh-hole (th).

Ok I figured it out myself it was simple lol.

Thanks for the help!

You going to share the solution?