My notes say to do it this way.
First, download the ISO for your OS. https://www.microsoft.com/en-us/search/explore?q=download+windows+iso
Mount the Windows iso as a drive and in this command specify the drive letter.
dism /Get-WimInfo /WimFile:D:\sources\install.esd
Find the index that matches your Windows OS version. This machine is Win10 Home, so I will use index #1.
Extract the wim file to a temporary folder. Verify that it's the right version.
dism /export-image /SourceImageFile:D:\sources\install.esd /SourceIndex:1 /DestinationImageFile:c:\temp\install.wim /Compress:max /CheckIntegrity
dism /Get-WimInfo /WimFile:c:\temp\install.wim
Delete the dism log so you only see the output for this run. Then execute the restorehealth.
del C:\Windows\Logs\DISM\dism.log
Dism.exe /Online /Cleanup-Image /restoreHealth /source:c:\temp\install.wim