chalk up to

Intermediate (B1) informal

To say that something happened because of a certain reason, usually something you can't control.

"She chalked her poor exam result up to nerves and vowed to do better next time."