Can I use my Samsung Note 8 pen and device as a stylus for my laptop?

How can I use my Android Samsung note 8 as a writingpad for my Laptop? I run Ubuntu 20.4 (I believe it’s the latest version)

I would like to use my phone to draw in Gimp or Inkscape. How would I do this?