Welcome to English in a Minute.
Chalk is a material used to write on chalkboards, but the expression, chalk it up to something,
has nothing to do with writing.
My best friend hired this really young guy to plan her wedding, and he's just awful.
Well, if he's young, you can probably chalk it up to his inexperience.
20% of his errors are from inexperience, but 80% is from lack of preparation and basic knowledge. Wow, you did math.
The phrase, chalk it up to something, explains the reasons why something happens.
It is another way to say that something was caused by something else.