Try reinstalling the program to fix this problem.” then Kindly install Direct X with the Web Installer.
Note: If you found Error while installation something like “The program can’t start because d3dx9_35.dll is missing from your computer. If it says it’s only supported through a different version of Windows don’t worry! If any DirectX files are missing will be replaced as needed.
It will not take more than 15 minutes to complete the installation process. I am providing the steps to update DirectX in any version, you can follow these steps. How to update DirectX in any version of Windows?