Ok so his name is trademarked, applied for 1 June 2017 - after his solo career began, and indeed his film career.
Are you saying that Harry then signed the rights to his trademarked name to Sony, and they now control the use of it? What, then, was the situation before June 2017?
No. Trademarking is a different thing. Trademarking is basically taking control over how the name you've trademarked is used to sell different products and grants you revenue for the use. It also stops others from exploiting your name for revenue. Harry also got "treat people with kindness" trademarked and Louis' got his x- eyed smileyface trademarked.
The 1D members trademarked the 1D name back in 2010, so the 1D members decide how that name should be used (on merch, toothbrushes, CD's etc.). That also means that if 1D were to switch label, they could use the 1D name still. H and L didn’t need to trademark their own names while in 1D, because everything they did commercially was under the 1D name.
Harry, along with the other members of 1D signed over the control of their public images to Sony in 2010. All the X-factor contestants did that, so that applies to them as well. That has nothing to do with trademarking. But, since 1D has the 1D name trademarked, the contract also states that Sony gets X percentage of the merch they sell with the 1D trademark and X percent of the sale of albums, movies etc. under the 1D trademark.
Trademarking really shouldn't be mixed into the conversation of the control over their public images, because it's different things. I think it happened because i answered two asks, one about trademarking and one about the control over their public images in a row. It made things more confusing than it really is.