Some NT people (and even ND) people will see it as hijacking or self centered, immature, etc but to others, it's a form of empathy and helping someone know you understand because you've lived it. As an ND person, I find that helpful.
It would be selfish if you use your experience to minimise their reaction or situation by saying 'oh this happened to me too... nothing to cry about', etc.
It would be hijacking when you then carry on to continue about yours and never let them speak about their experience but when you briefly relate yours then allow them to continue, it's fine.
Interestingly, a lot of times, NT people hardly find nuance in things. It's just black and white, either or but as an ND, the circumstances, intention and character or personality of the person involved is what determines what I call it. As an ND person, so many things depend on several factors that have to be considered even if it may be incovenient for some impatient people who'd rather just judge or jump to conclusions and put something/someone into a quick box.
And we're the ones with the "rigid thinking". 😆