Installing Xcode and Homebrew in Macbook M1
This paper consists of commands to install Xcode and Homebrew in Apple Silicone MacBooks

Paste the codes given below into your terminal. I have provided all the relevant codes keeping in mind that you have a brand new MacBook and Xcode, Python 3.8, et cetera are not installed.
Installing Apple Command Line Tools
Run these codes individually.
sudo xcodebuild -licensesudo xcode-select --install
Installing Homebrew on Apple Silicone
/usr/bin/ruby -e "%(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
In case there is any warning such as,
/opt/homebrew/bin is not in your PATH
create .zshrc on home directory (If it was not created yet). Just run the command below on a zsh terminal:

touch .zshrc
Then open it to edit with TextEdit (Is a hidden file. You can show hidden files with “shift” + “command” + “.” ) or type,
nano ~/.zshrc
and add the line below at the end of .zshrc.
export PATH=/opt/homebrew/bin:$PATH
Next open your terminal again and run:
source ~/.zshrc
Now just run this command to be sure that everything is working:
brew help