You won’t know unless the dr has a look but pulling at ears can be a sign.
Could be teething.
My LG is teething now, she hates me putting her flat on her back for a nappy change and does pull at her ear occasionally....she sleeps on her side now too. We have four top teeth coming through together!
Ear pulling can also be a sign of teething. Has he got a temperature ? That’s usually the first sign of an infection. Can always book a GP appointment to be sure and they’ll check him over