Hi, with your headphones plugged in, go to Settings >> System >> Sound >> Choose your output device and select Headphones, if listed. Some PCs use a shared Speakers/Headphones entry.
If sound still comes through the speakers, try another pair of headphones in the same jack. If those also fail, install the Windows 10 audio driver for your exact PC model from the PC manufacturer’s support website, then restart.
What is your PC’s make and model, and do these headphones work on another device?