How to tell a Mac to show 4k resolution or higher resolution even when it is not connected to such display? Sometimes I want to make a screenshot and found that if I do that on a 4k screen, then the screenshot is quite clear (and is in a high resolution).

So I can do this when my Macbook Pro is connected to a 4k display.  But let's say if I am on a trip, how do I make the Macbook Pro show or think it is showing in 4k?  I think this is possible even when we don't install any driver or software, because we can plug in a 4k display and choose "mirror the 2 displays" and the Macbook Pro native screen will pretend that it is a 4k screen, and any screen capture there will be in 4k resolution.

So the question is, if I temporarily don't have a 4k display, say on a business trip, how do I tell the Mac to show the native screen in 4k or even 5k?
It depends on which 4K you're referring to; if you're talking about the "actual" 4K (4096 × 2160), then: no (though you can come close).

However, if you're talking about the UHD 4K definition (See the link to Wikipedia above), which is 3840 × 2160, you can do it using 3. party utilities such as QuickRes (paid), SwitchResX (paid), or Retina Display Mode (free).

I've used QuickRes for a couple of years and definitely find it worth the $5. It's also the app I used to test.

Keep in mind: this only applies to the 15", the 13" can "only" display up to 3360 × 2100.