Write down all your thoughts. Your mind is for creating ideas, not storing them
Whatever idea or task you have, write it down somewhere. Once you have written everything down, your mind becomes decluttered and free from distractions. Since you know that your thoughts are safely stored somewhere, it removes the incessant feeling of “I need to remember… something” in your brain. This makes you completely focus on the task at hand.