I know it's a pain but look up how to get dx11 and dx12 (separately) make sure you have themready to download(even through windows update) then uninstall your current DX and install 11, see if that works, then if not uninstall that and do 12.
it could be as simple as a corrupted file, or a failure to register the dll location during install (so reinstalling fresh will sometimes work) or it could be a backwards compatibility issue between 12 and 11>.
Some people here have had success downloading the dll specified and putting it into the folder it should be in and replacing the existing one. perhaps the DX12 d3dx9_39.dll really is corrupted or they forgot to provide it with the rest of the install. I have no issues on Dx11.
It could be versioning too, 32bit vs 64bit, my computer shows one in Windows/System32 and Windows/SysWOW64
if one of these is missing that could be the issue. keep in mind they are not both the same, the 32bit one should be 4.76 MB and the 64 bit one should be 3.67 MB, I say this because if you're downloading a DLL online to put into these folders, you should be able to inspect them and make sure they at least look right. I normally disapprove of telling someone to download a dll from a random place online and do anything with it, because it can be insecure/a virus.
So I highly suggest you make sure you can definitely reinstall it, as in: get a link to the package from microsoft and then uninstall it and reinstall it. and try a lower version (11). before trying any dll shenanigans.