Do you have other devices on your I2C-bus? The device has rather weak pullups and the builtin pullups of the pico are even weaker. I assume that you use the Stemma/QT connector, so this would rule out a connection issue.
Since you only use a single device, I doubt that it is a pullup-issue. BTW: I use a Badger2040 with the AHT20 without extra pullups and that works fine. But I use the CircuitPython library but the MicroPython lib should be just fine. And I think the error isn’t even triggered directly in the library, it triggers when the I2C-object is opened.
So here are some more ideas: use the alternative plug in the AHT20. Use a different cable.
Nice to see. You actually had the correct id the first time you created the I2C-object, that is why the scan worked.
BTW: that is one of the reasons I prefer CircuitPython. You just use board.I2C() and you don’t have to worry about pins and bus-numbers. And if you decide to change the MCU, your code still works. (To be honest, the original pico is one notable exception since I2C can be on almost any pins, but CircuitPython for Pimoroni’s pico-lipo does define board.I2C()).