Why do modern airliners have only two engines?
Engines are expensive, maintenance-intensive and heavy. You only need 2 to keep a large plane in the air.

In the days of the 747 regulations required at least 3 engines if you ventured more than 60 minutes of flying time away from a suitable diversion airport (in case the second one also failed). However as reliability of engines increased this got extended with ETOPS certificates.