Step 1:
Install Python with the help of homebrew. If it is not installed in your system. You can install it from here.
https://mybeliefs.in/install-homebrew-package-manager-in-macos/

Step 2:
Run the below command in the terminal to install python3 in your system.

brew install python3