My TV is broken and I still want to play on my Xbox. I tried using an HDMI cable to connect my Xbox to my PC but my PC wouldn't display anything. How do I connect my Xbox to my PC using an HDMI cable?
You need a HDMI input port on your PC and configure your PC to simply use pass though the signal. I highly doubt there is one, it's most likely a HDMI output port. So you can't do it. If your monitor supports HDMI, you could try that instead (for the PS4, it won't recognize PC monitors unless the monitor supports TV input).
I know this answer doesn't specifically involve connecting an Xbox One to a PC with an HDMI cable as requested in the original question, but the overall objective of using a PC for sound and video while playing on an Xbox One can be achieved with Game Streaming via the Xbox App running on the PC.
For full details of how to setup Game Streaming see this Microsoft support page.
It's very rare for PC's to have any input for HDMI. If you have a monitor that you use for your PC and it has a HDMI port, you can plug it in there and change the input to HDMI, although the monitor may not have sound.
Another way is to start your Xbox (Hopefully you have auto sign in selected), and then start Xbox Companion App on the PC (you need Windows 10). Sign into your Xbox account on the Xbox Companion App, you can then stream your Xbox to the PC which has both Video and Sound streamed across.