The best assessment would be going to a vet who can safely and professionally assess if there seems to be something wrong with the ear. If you visually are seeing “stuff” there, that’s a good sign something is up. Head shakes can also be a head “binky”. Also, rabbits do scratch their ears, as a normal behavior, so if it’s not happening very frequently, it may just be simply that. If there’s enough scratching to cause bleeding or irritation, I would be more worried.
I would also recommend a vet assessment generally because your rabbit is on the younger side of being separated from their mother. Typically it is 8 weeks of age we see rabbits separated, so it may be good to get a baseline assessment of your rabbit’s health.
The answers provided in this discussion are for general guideline purposes only. The information is not intended to diagnose or treat your pet. Seek the advice of your veterinarian or a qualified behaviorist.