You are 19 and in love. Of course you think about your girlfriend a lot. That’s entirely normal. But you still need to go about the business of your life and do your studying.
I have a couple of suggestions: Studying and passing your exams will mean that you will have more to offer the woman you love. When you are studying, you are doing it for both of you and your future. Try to focus on that.
Ask your girlfriend to help you with the project. Ask her if she will schedule a couple of times a day when you can talk with her. If you know for certain that you will talk with her those times, you may be able to put your anxiety aside the rest of the time.
Give yourself something to look forward to. Plan a big reward for the two of you after your exams are over. Maybe you can plan a day together doing something you both really enjoy. When you get distracted, focus on the importance of doing your studying so you can both enjoy your reward.
Finally, please do consider if you just might be using the distraction of your girlfriend as a way to avoid doing your studying so that you will have an excuse if you don’t do well. If so, that isn’t fair to either of you. She shouldn’t be blamed for your lack of self-discipline. You shouldn’t let yourself fail when you are smart enough to succeed.
I hope some of these suggestions are helpful.
I wish you well.