Sounds like you're clicking the web result instead of the app. Press Windows key + R, type dxdiag and hit Enter, and the DirectX tool will open directly. Your version is shown on the first tab.
Windows 10 and 11 already have DirectX 12, so the error is probably because your program is old and needs the legacy DirectX files. Download the "DirectX End-User Runtime (June 2010)" from Microsoft and install it. If it still complains, right-click the program, go to Properties > Compatibility and run it in Windows XP or 7 mode.