If your database client is any good, it should do the retries for you. EdgeDB uses serializable isolation (as the only option), and all our bindings are coded to retry on transaction serialization errors by default.
Transaction deadlocks are another common issue that is triggered by concurrent transactions even at lower levels and should be retried also.