To take a screenshot on macOS, kindly follow these steps :
Capture the entire screen
Option 1: Simultaneously press Command + Shift + 3 for a snapshot of your desktop.
Option 2: Press Command + Shift + 3 + Control at the same time to save the image to your clipboard.
Capture a selected area
Simultaneously press the Command + Shift + 4 keys. Your pointer changes to a crosshair, click and drag to draw a frame around the area you want to capture. When you release the mouse button, the screenshot is saved to your desktop.
Further methods can be found here.