It usually helps to find a linked datasheet on the product page, to decrypt what the complex model number means: https://www.bourns.com/docs/Product-Datasheets/PEC11R.pdf
In this case, the difference between the recommended PEC11R-4015F-N0024 and PEC11R-4025F-N0024 (which is one of the options in Digikey site) is, that the recommended one has a 15mm long shaft (ā4015ā) and the other one has a 25mm shaft (ā4025ā).
So if you buy that, youāll get encoders that have 1 centimeter longer shafts, so they will protrude out of the front panel more (unless you cut them a bit with a small metal saw). Electronically they are identical. Or if you find some PEC11R-4020F-N0024, youāll get an otherwise identical part with 5 mm longer shaft than the recommended one, which will protrude just a tiny bit more than the recommended part.
You can also replace a model with āFā in it with equal āKā model, which means knurled (ārippledā) shaft instead of flatted (D-shape) shaft. That means youād have to find and buy different kind of knobs for the encoders for them to fit, but again, electronically it will work identically.