macOS doesn't come with a colour-picker utility. There's Digital Colour Meter app but I won't call it a colour-picker app.
Each of these three apps are free(or have free functionalities) and each of these solve the purpose of picking colours very well.
This is the simplest one which sits in your Mac menu-bar and shows the hex-colour value of the pixel your cursor is at on the screen in real-time. And I really like the developer has done app's icon.
It's free and available on App Store to download.
ColourSlurp is another great colour-picker and in my week or so usage of it, I found it a slightly complex to use.
It has all great features, including colour contrast, multiple color formats, collections, touch-bar support and more. Some of these features are paid but basic colour-picking is free.
You can get ColourSlurp here.
Pika is open-source native colour picker. The best thing about Pika is that not only you can pick colours from anywhere on the screen but compare colours for Contrast Ratio.
You can select from Hex, RGB, HSB or HSL formats which should work for most of us. Pika comes in very handy for quickly picking colours, you can trigger it with shortcut and copy the picked colour quickly.
Because of these options it has integrated into my daily use really well.
You can download Pika for free here.