My competitor launched their website 2 months after mine and in spite of it, it is in front of me. Why?

The first to come is not necessarily the best ranked.

A few months head start between two competing websites means little.

They probably just worked on the optimization of their SEO more than you did.

SEOSoftware Oseox Monitoring