Hi Elias,
I'm Dyari. Thanks for reaching out. I will be happy to assist you in this regard.
DirectX comes preinstalled with Windows 11.
Click on Start > Type dxdiag and hit Enter > Display Tab > Do you see Direct X feature?
May I know what issue you are facing that needs DirectX to be installed?