Just imagine You and your PC + internet are locked in one room. Yes, it becomes a better place to work without any disturbance.
So, find a quiet place to do work or learn something. Because your mind gets to focus on that thing only.
First, prepare a plan before starting any project or work. Split the task and allocate the time to every task according to you.
Also, prepare a To-do list daily and write down the subtask to complete.
Programming is the game of mind right. And your mind also needs some healthy food and Food for the mind is enough breaks.
If you work multiple hours without any breaks, it may lead to information overload, anxiety, and lower the quality of your work.
So, take a break and meet your crush (if possible), Do some exercise, spend a few hours with nature or do something that makes you feel better.
You should have a grasp of the tools that you are using for your work. Like, code editor, browser, terminal, etc.
Not only tools also must grasp on what programming language you’re using, framework and etc. technology.
It’s great if you can ask someone else in your environment to have a look at your coding habits. You may receive helpful advice on what you can improve to be more efficient.