Microsoft has included video and audio players with Windows for decades, but Windows 10 and 11 can't play some media formats without extra (paid) packages. Some audio and video codecs require a paid license to use in commercial products (such as Microsoft Windows), so instead of lumping all those costs into every copy of Windows, you might see a link to a Microsoft Store page for a media codec when playing some files. Fortunately, at least some codec packages might be free for you.

High-Efficiency Video Coding, also known as HEVC or H.265, is one common media codec that is not free to use in commercial products. However, as pointed out by Froggypwns on Reddit, many graphics cards ship with a license to use HEVC, meaning you might not have to buy it again on your PC. To find out, just open the Windows Run dialog (press the Windows/super key and 'R' at the same time, or right-click the Start Menu and click 'Run'), paste the following URL, and press Enter on your keyboard:

        ms-windows-store://pdp/?ProductId=9n4wgh0z6vhq
    

The Microsoft Store should open with a page for "HEVC Video Extensions from Device Manufacturer." If your PC hardware comes with a license, you can just click 'Install' to download the codec. Easy peasy.

XDA's Adam Conway tested this out and clicking the "Install" button at the top on Windows 10 worked.

XDA HEVC free

If your PC doesn't include an HEVC license, there are plenty of other ways to play media with that codec (and other proprietary media formats) on your Windows PC. The most popular option might be VLC Media Player, which is a free and open-source media player that can handle just about any video or audio format imaginable. You can download the Windows version from the official website, and while VLC is also available on the Microsoft Store, the Store version is a UWP application with fewer features. You're probably better off with the normal desktop VLC app.

https://apps.microsoft.com/store/detail/9nblggh4vvnh

Thanks Mishaal Rahman for the tip!