As @Old_Grey said, a part number or data sheet is the starting point after you have typed rotary encoder in to the part search (the magnifying glass in the parts bin on the right). Around 6 different rotary encoders come up for me. If one of those won’t do we would need a data sheet to help.
Peter