Hello @Aimi and welcome to the forum
Which version of krita are you using and which operating system?
This problem has often been seen with a Huion tablet.
If you do a search (the magnifying glass icon at the top-right of the screen) for ‘straight line’ then you’ll find many topics about this.
Here are two examples:
Lag at the start of a pen stroke, resulting in straight line
Krita draws a small straight line before drawing a circle
Essentially, you need to disable Windows Ink in the tablet configuration utility and make sure the krita is set to use Wintab, not Windows Ink.
Please read those and try the fixes suggested in there.
This may fix things for krita but I’ve no idea about your other applications.
You may need to check that you have the latest driver for your Huion H950p by going to the Huion website, downloading the latest driver then reinstalling the driver.