@Bs2209 It is an aid in removing the S Pen from the S22. If that bit didn't click out, you wouldn't be able to remove the S Pen.
[Edit] I originally thought you meant the button on the end of S Pen. Are you referring to the button built into the S Pen about 2/3 of the way down? That is certainly functional. You can find many of the functions mentioned in phone settings -> Advanced -> S Pen
@Bs2209 Go to phone settings -> Advanced -> S Pen to find many features of the side button on the S Pen. Air commands is the most powerful.
Also you can go to phone settings -> Help. Here you can search for S Pen and find many articles on how to use it.