“UK has very specific laws.”
What law?
the law that allows the Monarchy the exclusive right to bestow titles, styles and peerages on commoners, and take them back just as quickly. For instance, the Duchy of Sussex cannot be owned or inherited by a female. So the Duchess of Sussex is is out of luck trying to get any portion of the Duchy in a divorce. Smart Queen, that one.
As to Harry, since he’s a royal in the line of succession regardless of how far down he is, it would indeed take a parliamentary act to remove him from the line of succession. But it does not take an act of parliament to strip him of all titles and styles save that of Prince, as the Queen has already done.