If I had to guess surely 100k depending on the vehicle and weight. I’ve had some oem shocks last 200k miles and still performed without an issue. I would drive it till it needed replacing.
Besides the obvious of a rusted out shock, damaged or bent piston rod - As long as the shock is not leaking or seeping any fluid, it should still be functional and perform as designed.
The only other areas of wear/tear for that example would be if it’s not leaking or physically damaged, then any rubber bushings or mounts will usually be fatigued or worn beyond repair and service life. Usually the rubber bits will crack, become less pliable or totally deteriorate due to use and environmental conditions.