Yes , you can install magento 2 on macbook !!
Before installing magento 2 - you need to required to install its pre-requisite software and configurations.
like - you need to install PHP , Apache 2 , composer , Mysql for database !!
So here is the reference link for step by step how to install magento 2 on Macbook - https://www.magestore.com/magento-2-tutorial/how-to-install-magento-2-on-mac-osx-10-11/
you can also refer this link for your reference - https://www.human-element.com/installing-magento2-on-mac-for-local-development/