My laptop is m3 convertible and works only with a passive pen (the cheap type with no power). The issue isn’t with this particular pen but more with the laptop. If you have an HP Pavilion x360 go on HP support and search Touchscreen Compatibility. All their PC’s compatible with pen are listed with the type of pen works with them.
https://www.amazon.com/HP-Digital-Touchscreen-computers-Natural/dp/B06XVDK7TV

