im no expert but by the error message of direct x it really does sounds like your graphics card is not being detected somehow so it's true that it might be defective.
the only advice i can give you is try another operating system as windows 11 is garbage and frequently pulls random shit like this for no reason.