What are the assumptions of MLE and how to test them using residuals? When using ordinary least square (OLS) method, there are certain residual diagnostics that need to be performed.
In a similar manner, what diagnostics should be performed when using Maximum Likelihood Estimation (MLE) when fitting a model?

When performing MLE, model parameters $\Theta$ are optimised according to the likelihood $p(D|\Theta)$, where $p(D|\Theta)$ is calculated according to the assumed likelihood structure -> data-generating process. There is a large large number of such processes (and consequently likelihoods -> models) available, including likelihoods for which residuals are expected to be heteroskedastic and / or correlated (see e.g. R package nlme).
If you want to test if your observed data / residuals fit to your model assumptions for a given likelihood, the general idea is that they should behave as you would expect, given your likelihood. For example, if you have a likelihood that assumes residual autocorrelation, you would expect your naive model residuals to have the same property.
How to best check this in practice depends a lot on which model we are talking about. For GLMMs in R, the R package DHARMa (disclaimer: I am the developer) may be a good starting point.
