There is no magic bullet. You can follow along here.
https://support.microsoft.com/en-us/topic/use-the-system-file-checker-tool-to-repair-missing-or-corrupted-system-files-79aa86cb-ca52-166a-92a3-966e85d4094e
In most cases when windows servicing becomes broken, you'll be far better off to clean install it, patch fully, migrate roles over and move on.
--please don't forget to upvote
and Accept as answer
if the reply is helpful--