The tool is called High Resolution Screenshot and can be used in a two different ways.
First one is using editor user interface. In the viewport, press the dropdown button and select High Resolution Screenshot. Once pressed, a new window will pop up with some options to set. Pressing Capture will take the screenshot and save it to the Saved\Screenshots directory.
Second one is using a cheat command which is very handy especially when you want to capture a screenshot in a packaged game. To capture a screenshot open cheat command prompt by pressing tilde key (~) and type HighResShot. By default, the command will capture a screenshot in a resolution 4 times greater than the current game’s resolution. You can change it by adding a parameter at the end, or by passing a specific resolution:
HighResShot 2or
HighResShot 3840x2160You can find more details and an explanation to each parameter and option here in the official documentation of this tool.

