Once you can hit shots the way you like, then you need to learn how to repeat it. First thing is to have the same set-up routine each time. Record your routine on video, writing down each step. My routine is grip on, right foot pointing at the ball, club behind ball, set feet, shuffle feet to find balance, waggle club, look at target, second waggle, second look at target, settle in, quiet the mind, and swing. Do yours until you can repeat it without thinking.
Next work on the sequence and rhythm of your swing (think torso unwinding with arms and club following). This is the glue that holds things together under stressful situations. The set-up routine and swing should take the exact amount of time.