Sometimes indeed a break in the skin can lead to an infection.
A scratch from a fingernail is considered 'low risk' fortunately -because it's a relatively open type wound and not very deep. (Unlike some other types of injuries). The body has a very good immune system and I don't expect any major complications from this. If you have pain, some discharge, ?visible redness or other symptoms see an MD