I don’t think it’s illegal, but a Catholic cannot become the king or queen.
They’re going to have a closet muslim as king soon.