You haven't told us what sensor/breakout board you are using. There is a good reason why How to get the best out of this forum says:
We need to know exactly what hardware you have. We need to know what Arduino board (or other brand, such as ESP32) you are using and exactly what other hardware you are connecting it to. The more details we have, the easier it is to help.
If you are using something that is a non-Arduino product then it helps to have a link to its technical data sheet or a link to where you bought it.
Both the BME280 and BMP280 are 3.3V devices. The Uno R3 is a 5V device. Does your breakout board include a 3.3V regulator? Does it include level shifting? Since you haven't told us or shown us what breakout board you're using, we're left to guess. Which just wastes your time, and ours. We'd love to help; please don't make it harder to do so.