This is a really good question. While people will give the normal comparison between past tense and present perfect, it’s not that simple.
I meet my friend and he has a broken arm. It happened in the past and it is still relevant now. So some will say it should be ‘What has happened?’
However, it is much more natural to ask ‘What happened (to you)?
I think this is because ‘happened’ relates to a very specific point in the past.
I happened to see him. Means I saw him without out arranging it.
I have happened to see him. Not correct at all.