It’s what is now known as a click-bait claim:
https://www.history.com/news/is-queen-elizabeth-related-to-the-prophet-muhammad
Anyway, if Charles actually said that I view it as an example of the strange compulsion that a ‘politician’ has to say something anything no matter how stupid when put in front of a crowd.
And when out doing royal PR the “royals” are the functional equivalent of a politician.
Oops, sorry! someone beat me to it about the Mo rumor.