Your child understands a lot more than what they did few months back. And with that understanding, he is also quite fit to know what the concept of apology is. However, before a child can apologize, they have to realize they have done something wrong; a concept 2-3 year olds don't easily grasp all the time.
What you need to know
Your child at this age is still in the 'me' phase, wherein they can't really differentiate between right and wrong and so, they don't realize the mistakes they commit. You are the best educator to teach your child how to apologize when they make any mistakes.Parents as well as teachers often need to step in and point out when an apology is needed.
With kids 2-3 years old, just focus on enforcing the rules by teaching the children how to identify their mistakes and accept them. Your child will have less to apologize for later. And if need be, don't worry about coaxing a "Sorry" from them.
Importance of learning how to apologize
Kids aren't always sorry for the things we think are worth an apology. And even when they are, many have a hard time uttering the word. Some kids may actually blurt out "I'm sorry" too easily and consider it a quick way to satisfy adults and get back to play. But when a child knows how to say they are sorry, they gain more than a social skill. They also learn how to undo their mistakes, take responsibility for their actions, and consider others’ feelings.