> when Airbus launched the A380, Boeing thought they would have an easy home run with the Dreamliner,
This is ahistorical.
When Airbus announced the A380, Boeing tried to respond with their own version, the 747X [1]. The 747 is arguably the most successful aviation platform in history and was hugely profitable for Boeing for 40+ years. But the industry changed to wide-body 2 engine planes (eg 777, 787, A350) because they're more economical to run and engines have become so reliable that they'll generally last the entire service life of the plane.
The A380 needs 4 engines. The 747X would've too. Even with higher passenger count, running 4 engines instead of 2 is a huge economy issue. Basically you needed to fill ~550 seats to make a profit and not many routes could support that. It works great for the ME3 airlines and arguably a couple of Asian carriers (eg Sinapore Airlines) but not really anybody else and certainly not US airlines.
A way more pivotal moment was the A319neo. This was a complete surprise to Boeing and represented an existential threat to Boeing.
As you may already know, commercial pilots are generally certified for a single type rating at a time. They can train and certify for another type rating but generally speaking commercial pilots won't switch all the time between, say, a 787 and an A350 or even a 787 and a 737.
So airlines like Southwest keep costs low by maintaining a single type rating fleet, being the 737, an airline originally designed 50+ years. So that's both a blessing and a curse for Boeing. The curse being they lose that lock-in if they design a new cockpit. Airbus didn't have that problem.
But the A319neo was so efficient and coule potentially suit US airlines that Boeing ahd to respond and make the 737 more efficient, which of course led to the whole MCAS debacle.
That wasn't the first time Boeing had issues either. Back in the 90s the 737NG had an issue (that caused crashes) with the 737 rudder getting stuck in flight. That took years to resolve.
There were issues for Boeing as a company with the 787. That's when Boeing tried to savagely cut costs with layers of subcontractors and it was a disaster that delayed delivery by years. That's continued with the 737MAX issues like the door panels not being bolted in.
[1]: https://simpleflying.com/boeing-747x/