Finding love as an adult is complicated. Each person usually brings hurts, disappointments, and expectations (positive and negative) from past relationships. It’s not unusual for people to have to work through old issues in a new relationship. Your prior experiences led you to conclude that is is unwise to share anything from your past. Your girlfriend was apparently so hurt by someone that she felt justified in violating your privacy by looking at your private diary. You reacted by getting defensive and lying. Neither of you behaved well.
I think you are taking too much on yourself. I don’t think the question is how you can regain her trust. I think the problem is more properly defined as a problem with trust with each other. This moment in your relationship can be a reason to quit or it can be an opportunity to grow together. For the latter to happen requires that you both acknowledge that hurts in the past are influencing your present. It requires that both of you sincerely apologize for treating the other as if they are someone else.
If you both feel that this relationship has the potential to be something really special, it seems to me that it is worth the work. Both of you have an apology to make. Both of you need to find the courage to give each other your best selves.
I wish you well.