No need for maintenance mode.
Follow these steps, rebooting after EACH step and running from an ELEVATED PROMPT.
Run each step separately:
Setup.exe /IAcceptExchangeServerLicenseTerms /PrepareSchema
Setup.exe /IAcceptExchangeServerLicenseTerms /PrepareAD
Setup.exe /IAcceptExchangeServerLicenseTerms /PrepareAllDomains
Install .net 4.8
https://learn.microsoft.com/en-us/exchange/plan-and-deploy/supportability-matrix?view=exchserver-2019#microsoft-net-framework
Then install CU23:
https://www.microsoft.com/en-us/download/details.aspx?id=58392
Then install the security patch:
Critical Patch:
https://www.microsoft.com/en-us/download/details.aspx?id=102775