To take a screenshot on Mac, please follow these steps:
How to take a screenshot of your entire screen
Press Shift-Command (β)-3.
Find the screenshot as a .png file on your desktop.
How to take a screenshot of a window
Press Shift-Command-4. The pointer changes to a crosshair.
Press the Spacebar. The pointer changes to a camera.
Move the camera over a window to highlight it.
Click your mouse or trackpad. To cancel, press the Esc (Escape) key before you click.
Find the screenshot as a .png file on your desktop.
You can find alternative ways of taking a screenshot on Mac here.