21 consecutive days is all it takes to create a new habit.
While this sounds too good for the most of us it's actually true for a lot of cases.
If you do something straight for 21 days or more, it'll be engraved in your brain as a habit. After that, you'll face less resistance to do the same task.
However, always keep in mind that 21 is not the golden number. While some habits are formed in 21 days, some take a lot more than that.
The key here is to not start something with the goal of doing it for just 21 days. You should start something with the intention to do it long term, preferably lifetime.
The more you practice, the better you get.
The 21 days is just a number to help you get started. To overcome the initial resistance that your brain throws at you when you're stepping out of your comfort zone.
Just remember this:
Whatever you want to be good at, just keep doing that thing every single day. Eventually, it'll be your second nature.