I know that LevelDB stores information about UTXOs in the way like txid->utxos.
Not anymore.
The database is used like an in-memory object. It's a key-value store, so it's basically just an enormous map or dict. So when a block removes a UTXO, it's removed from the database. When one is added, it's added to the database. Of course, there are database transactions and batching so that all of these updates occur atomically, either a block and all of its changes went through, or it didn't. Additionally, LevelDB will cache things in memory with changes only being written out to disk when the cache is full, or at periodic intervals.