Just been rejected from a job interview that I put my heart and soul into and I feel crushed

The job seemed so perfect for me, particularly with my experience and qualifications.

This should be the kind of job I am able to get, yet I didn't.

I spent dozens of hours doing interview prep and preparing for this thing, and I still failed.

How do I even reconcile this?

*Update:

So I requested feedback and after over 24 hours they finally sent it through. Basically the person who got the job is doing a very similar role already and so had firsthand experience of the exact software this job uses.

Basically, once again I got beaten out by somebody who is already doing this kind of job. How the Hell am I ever supposed to compete with somebody that has ‘perfect experience’ - I’m so incredibly annoyed.