What is the difference between the BMP280 and the BMP390?
The BMP390 offers better absolute accuracy, better relative accuracy for altitude, and a part still in production; in our table the BMP280 has no advantage of its own apart from price, and it is at the end of its life.
Which is more accurate, the BMP280 or the BMP390?
Absolute accuracy, for weather readings: ±1 hPa for the BMP280, ±0.5 hPa for the BMP390. Relative accuracy, for altitude: ±0.12 hPa and ±0.03 hPa.
Can I replace the BMP280 with the BMP390?
Often yes: both use I²C or SPI. Change the driver or, in ESPHome, the component (bmp280_i2c → bmp3xx_i2c).