should i use displayport or hdmi
Choices, choices. When it comes to connecting a computer to a monitor (or picking a monitor to buy) one of the last things you want to get bogged down in is a decision over which connections you need. Especially when you could be dwelling on more exciting features, like whether the HDR you can afford is worth it.
And the truth is, a lot of people overthink it -- in most cases it doesn't matter. It can when new technologies begin to overlap, such as when HD was making way for 4K, but then you usually don't have a choice
For general-purpose use -- and a single 4K display is no longer a special case -- then it doesn't matter. You're probably better off with HDMI, in general, simply because monitors with DisplayPort (DP) in addition to HDMI tend to be more expensive.
But if you're one of the edge cases where you do need to think about it -- for console or PC gaming, color-critical work, business travel or multimonitor configurations -- here are some guidelines.
If you travel for business and want to hook up to monitors in different locations, it's HDMI all the way (and version doesn't really make a difference). That's the most pervasive connection type. You may want to ensure your laptop has a built-in full-size HDMI connection as well, though they're getting scarce; while you can use USB-C-to-HDMI or micro HDMI-to-HDMI dongles, they're easy to lose and you don't want to spend the first 20 minutes of your meeting time hunting for one. Any laptop that's light enough to tote everywhere doesn't have a DP connection, anyway.
For gaming... ugh. There really are no easy answers, because that opens the "AMD vs. Nvidia vs. neither" can of worms. If you've already got a monitor with a DP 1.4 connector and a matching graphics card, then use the DP, simply because it gives you the most ways to configure adaptive refresh and at the moment supports the highest refresh rates. HDMI tops out at 144Hz uncompressed or 240Hz compressed, while DP 1.4 can hit 360Hz in 1080p.
If you're trying to pick a monitor, HDMI is the budget-friendly choice, but if you've got DP you'll have more options if you plan to upgrade to a new graphics card or add an external GPU in the near future. DP is obviously better if you've got an Nvidia card and want to use G-Sync; FreeSync may be better over DP as well.
For consoles, you really don't have a choice -- they only support HDMI -- but you have to pay attention to not just the version of HDMI, but the specific list of features it supports. To support variable rate refresh (VRR) on the Xbox Series X/S, and forthcoming on the PS5, as well as dynamic HDR metadata (HDR10 Plus) for better HDR rendering, you can't assume that a monitor with an HDMI 2.1 connection automatically supports them. You need to check specifically that the monitor's or TV's specs for HDMI 2.1 explicitly state that they do, at the resolution(s) you care about.
For color-critical work either HDMI 2.1 or DP 1.4 have enough bandwidth to handle an uncompressed data stream, especially at 4K.
For multimonitor setups, you might want (or need) both. Depending upon your graphics card you may only have one of each connection type or USB-C only, anyway, and if you're forced to daisy chain the USB-C DP it may limit the resolution options. (For multi-computer setups -- connecting two computers to a single monitor -- the connection type matters less than the features of the monitor.)
Sarah Tew/CNET
If you'd like to make up your own mind, though, here some considerations to take into account: