A common problem is the failure of the fuel tank hatch drive motor, it is often faced by owners of Audi A6C7 A6C8 A7
In order to open the jammed gas tank, you can try to pull the red cord, which is hidden behind the trim in the trunk, after that you need to press the lid, if it still does not open - it is useless to pull, just tear this cord. Then you will need a flat screwdriver (or any other thin tool). With a screwdriver, the latch of the lining is pulled and moved back (if the lid is closed, then the lining is shifted towards the rear bumper).
To open the gas tank, you will have to break the lid lock, this part is still assembled and needs to be replaced, since the motor is not repairable
=========================
Articles of the fuel tank cap drive motor:
VAG 4L0862153D - executive element (lock)
VAG 8V0862153A - executive element (from Audi A1, A3, Q3, Q7, but suitable for A6, A7)
=========================
My blog on Drive2 https://www.drive2.com/users/mark47/