What's the best way to write on canvas?

Hey, guys.
I need to be able to write on the screen as close as possible to using a pen.
I’ve seen this demo which is as close as I can get.
https://phaser.io/examples/v3/view/input/pointer/draw-sprites
Is it the right one to start with? Or is there another way to make it more accurate?

Thanks in advance, community.

https://phaser.io/examples/v3/view/game-objects/render-texture/paint

hi
great !!
thks for reply