I've looked everywhere and there's no actual examples or tutorials regarding using tablet pens with Unity.
I tried using the GetTouch function I found on a forum just to see if that would work:
float pressure = Input.GetTouch(0).pressure;
then displaying the value as a string to see it's value, but I get a "Index out of bound" error.
First you have to install the package Input System
After that you have to add the namespace UnityEngine.InputSystem to your script (line 2).
The value can be read with
Pointer.current.pressure.clampConstant
Further information can be found here