Despite Microsoft making a bunch of different versions of pens, they mostly all just work. This post is trying to be exhaustive but the vast majority of people who aren't extremely Deep into the Photoshop game will not need or care about any of this.

Basically, "If the pen fits in the keyboard slot, it just works". I'm currently using a pen from a Surface Pro 7 on my new Surface Pro 12" and it was trivial to connect it and it works great

Doesn't even need to fit in the slot either. One of my Surface Pens is an older one that uses a AAAA battery and doesn't fit in the keyboard slot. It works just fine on my SP11 and older SPX. It just has less features and isn't as good as the newer Slim Pen 2.

Some non-Surfaces too. I’m using a Microsoft Surface Pen “Model 1776” a.k.a. “Ver.4” a.k.a “Surface Pen with no clip” with my Framework Laptop 12 folded all the way around into tablet mode.