In the similar case on Drupal 10.2, I am getting an error on $account->save();
On Windows WAMP with PHP 8.2 (With error reporting enabled):
Fatal error: Uncaught AssertionError: Transaction $stack was not empty. Active stack: 65a57aa37f5ba6.98051663\drupal_transaction in D:\www\public\core\lib\Drupal\Core\Database\Transaction\TransactionManagerBase.php on line 99
On Linux with PHP 8.2 (With error reporting to database as it is production):
Error: Undefined constant "Drupal\Core\Entity\SAVED_UPDATED" in Drupal\Core\Entity\ContentEntityStorageBase->doSave() (line 703 of /www/public/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php)
The `public/core_compare` directory is result from `composer status` command.
The error is basically due to difference in PSR Logger version. The OP may need to update the google API module to be compatible with required PSR Logger version.