Hey Supernova, sorry for the late reply.
No one in this forum seems to have any idea as to why this is happening. I asked the same question on some Facebook Canon M50 groups and the consensus is that it's nothing to worry about. Which, I agree. My M50 worked perfectly fine even with this clicking. However, I would have like to know why it made the noise in the first place. I've since sold my M50 mark ii and upgraded to a Fuji X-S10.