To better assist you on this, since you have posted the question on Azure Static Web Apps, just to clarify, have you hosted your WordPress webapp on Azure App Service WebApp or on an Azure VM or some other service?
Kindly let us know, I'll follow-up with you further.
See - WordPress Best Practices for Performance
We may have to re-tag to receive insights from the targetted SMEs/audience.