Update your post to include full system hardware specs and OS information.
Any interim cables or adapters between the headphones and computer?
Are there other audio ports on the computer and do those audio ports work for the headphones or other known working headphones or audio devices?
Look in Reliability History and Event Viewer for any audio related error codes, warnings, or even informational events.
Reliability History is easier to use and understand so start there. No need to rush through - take your time to learn the way around and gain a sense of the information being presented.
Double check all audio related configuration settings by right clicking the small speaker icon usually located in the lower right screen corner.
The click will open a menu that, in turn, leads to all sorts of window, tabs, and property settings. Explore first but do not immediately change anything.
One menu choice is "Troubleshoot sound problems" - give that choice a try.
Likewise run other Windows Troubleshooters. The troubleshooters may find and fix something.
Lastly, try "sfc /scannow" and "dism"
References:
https://www.lifewire.com/how-to-use-sfc-scannow-to-repair-windows-system-files-2626161
https://www.windowscentral.com/how-use-dism-command-line-utility-repair-windows-10-image