Some kind of sliding potentiometer. Sliding switches are much shorter and tend to only have discrete stop points.
This looks similar to what you have here:
https://www.digikey.ca/en/products/detail/bourns-inc/PTL01-15R0-103B1/6605956
There are only 800 or so kinds of sliding potentiometer with a LED in Digikey, so you can probably find the exact one pretty easily. Once you have the name from Digikey, you can go to LCSC or your usual distributor to actually buy the thing.
Thanks!