There’s a difference between hitting balls at the range and playing on the course. At the range, you have another chance if you hit a bad shot so there’s no pressure. On the course you only have one chance and what you do will affect your score.
Sometimes golfers can lose focus on the range and get lazy with their swings. So it’s important to simulate how it would be on the actual golf course.
One helpful tip is to change clubs and targets on the range. Try to play a hole that you are familiar with. First hit your drive, then hit whatever iron would be your second shot, and then your third shot if it were a par 5. Then start over and pick another hole and do the same thing.
When you are on the course, you’ll feel more comfortable on these holes because you have practiced playing them on the range. Some golfers have trouble with their first tee shots or maybe hitting over water. You can visualize these situations and practice with the feeling of being on the first tee or pretending there is water to hit over.
If you get nervous on first tee shots, try and simulate and make yourself feel the pressure of everyone watching you. Go over in your mind exactly how it will feel to be on the first tee or starting a tournament round.
Practicing this way will greatly improve that area of your game when you are out on the course. You'll feel like you have done it successfully before so it will seem easy.