Both brothers indicate that it was tough:
Harry:
"Harry had previously said walking behind her coffin aged 12 was something no child "should be asked to do". He has now told the BBC he doesn't "have an opinion whether that was right or wrong", but "looking back on it", he is glad to have been part of the day."
William:
"Prince William told Sunday's 90-minute documentary, Diana, 7 Days, walking behind his mother's coffin was "one of the hardest things I've ever done".
The Duke of Cambridge, who was 15, recalled using his fringe as a "safety blanket" during the "very long, lonely walk". "I felt if I looked at the floor and my hair came down over my face, no-one could see me," he said.
"It wasn't an easy decision and it was a sort of collective family decision to do that... there is that balance between duty and family and that's what we had to do." The balance, he added, was "between me being Prince William and having to do my bit, versus the private William who just wanted to go into a room and cry, who'd lost his mother".
Having lost a parent at a young age myself I think it's utterly appalling that the family even considered this as an option for those young lads. And, a Vogue article indicates that Harry only did it because he didn't want William to be alone on that walk:
"Another plan suggested that the elder William walk without Harry. In his memoir, Spare, Harry recalls refusing to do so: “I didn’t want Willy to undergo an ordeal like that without me,” he wrote."
The Vogue article (https://www.vogue.co.uk/article/princess-diana-funeral#:~:text=As%20adults%2C%20both%20men%20have,he%20told%20Newsweek%20in%202017. ) goes on to say: "As adults, both men have spoken out about the deep pain this choice caused them – especially Harry. “My mother had just died, and I had to walk a long way behind her coffin, surrounded by thousands of people watching me while millions more did on television,” he told Newsweek in 2017. After he distanced himself from the royal family in 2020, he spoke more openly about the trauma: “The thing I remember the most was the sound of the horse’s hooves going along the Mall, the red brick road,” he said in the 2021 docuseries The Me You Can’t See. “By this point, both of us were in shock. It was like I was outside of my body. I’m just walking along and doing what was expected of me, showing one-tenth of the emotion that everybody else was showing.” Eventually, he admits, the pain caused by his mother’s death – and his subsequent suppression of it – led him to seek therapy."