Apple publish high-quality, audited environmental impact reports for all their products. A 64gb iPhone 8 produces the equivalent of 57kg of CO2 across the entire product lifespan, from manufacturing to recycling.
A return flight from LAX to JFK produces ~580kg of CO2; the climate impact is equivalent to ~1100kg of CO2, because emissions at altitude have a greater warming effect.
Driving 10,000 miles in a typical sedan or crossover SUV emits about 3000kg of CO2; in a large pickup like a Ford F150, that figure is closer to 4500kg.
The food consumption of the average US household results in equivalent CO2 emissions of 8100kg.
Our carbon emissions are dominated by heating and cooling, transport and food. Keeping your phone for another couple of years is a rounding error in the scheme of things - it's equivalent to a two-hour car journey or a good restaurant meal. If we are to stand any chance of limiting the impact of climate change, we need to make big, difficult choices about our lifestyle.
We need to massively reduce the amount we drive and fly. We need to redesign homes to require less active heating and cooling. We need far more sustainable electricity generation. We need to radically alter our diets and our approach to agriculture, with far less meat and dairy consumption. This will be difficult, expensive and politically unpopular, but it's the only way we'll make a meaningful impact.
https://images.apple.com/environment/pdf/products/iphone/iPh...
https://calculator.carbonfootprint.com/calculator.aspx?tab=3