While you think that slow typing is cause buy yourself, well there are sometimes factors that make it slower.
We can name a few in this article to get you introduced and you can find ways to improve.
The type of keyboard
Keyboard oftenly may cause you slow typing, having a bad keyboard causes difficulties in fast and effective typing as pressing keys that are not smooth makes your concentration gone, while having a good and smooth press keyboard lets you smoothly do your whatever typing techniques.
Punctuations
Having a lot of punctuations in the source that your typing tends to make your efficiency a lot lower. Many of us, including me, hate punctuation as these keys are very hard to memorize where they reside. It is very difficult to register them in your muscle memory and causes momentum loss while your typing.
Finger position
Improper finger position is one of the most common reasons to slow typing. The best thing to achieve better typing is knowing your typing finger position. This always helps the typist have better muscle memory to their keyboard.
And a lot more...
There are a lot more influences that leads to a poor typing experience but with consistency and practice you do better.