How to enable EnableRetryOnFailure?

In my Umbraco 15 install I am getting random errors of type:

System.InvalidOperationException: An exception has been raised that is likely due to a transient failure. Consider enabling transient error resiliency by adding ‘EnableRetryOnFailure’ to the ‘UseSqlServer’ call.

How do I enable this function for SQL in Umbraco’s program.cs?

Bump, can anyone please tell me how to do this in umbraco so I stop getting these SQL errors?