I an neurodivergent and a lot of it runs in my family. This type of behaviour is really frustrating to live with, and I think it relates to a psychological concept called "theory of mind", the ability to understand other people, including anticipating their thoughts and actions/reactions.
He put some level of thought into a gift, proven by the fact he actually purchased a gift, but he clearly was not thinking about what you would like. Is this normal for him to have no idea of what you would like?
Then when you were upset because the gift feels thoughtless to you, he still has no capacity to understand why you are upset, and in turn he gets upset because he thinks he put thought into a gift and his effort is not being appreciated.
My ex bought me so many alarm clocks as gifts. I never wanted an alarm clock. He couldn't comprehend the fact I was happy without an alarm clock, so kept buying them for me. Some made horrendous rings I would never want to wake up to, so he thought he bought me the 'wrong' alarm clock, he just couldn't understand I wasn't bothered. He himself couldn't live without his alarm clock and couldn't see a different perspective.
It is even worse when lack of theory of mind is combined with another neurodivergent trait of "rejection sensitivity" because when you point out to them their gift is thoughtless, instead of seeing your POV and offering to return the item or a similar appropriate response, they feel attacked and get upset and defensive.
The difficult thing when someone lacks theory of mind, they are not intentionally setting out with bad intentions. Then if you are like me and highly empathetic, you keep excusing their behaviour and giving extra chances because deep down you know they did not have bad intentions.
Having no theory of mind and naturally lacking empathy, can present as narcissism when it is extreme, and as a plain old thoughtless selfish arsehole when it is less extreme.
In the end my exes thoughtless selfish behaviour really affected myself esteem. I can see one of my sons has very similar traits and I am doing all I can to try and develop his skills and abilities to recognise and anticipate how others may be thinking and feeling.
Like most things, is this charm bracelet incident isolated, or is it part of a pattern of behaviour? That helps determine an appropriate response.