If you mean the original Surface Pen supplied/used with the Surface Pro 5 (2017), it is compatible with several later Surface models.
Microsoft identifies that pen as Surface Pen with no clip (4096 pressure levels), and lists compatibility with:
Surface Pro 5
Surface Pro 6
Surface Pro 7
Surface Pro 7+
Surface Go / Go 2 / Go 3 / Go 4
Surface Laptop 3/4/5/6
Surface Book 2/3
Surface Laptop Studio / Studio 2
Surface Studio 2/2+
For newer Surface Pro 8, Pro 9, Pro 10 and Pro 11, Microsoft recommends the Surface Slim Pen 2. These devices support Microsoft's Pen Protocol, but the old Pro 5 pen does not provide the newer features such as tactile signals and the Slim Pen's charging/storage system.
Microsoft Reference Article: