Issue installing Homebrew on MAC M1

Hello, I’ve tried installing Homebrew on my MAC to progress with Python excersises. But outcome was unsuccessful. Can any expert help me sort out the reason of Homebrew installation failure and advise next steps to handle it smoothly.

==>* *Downloading and installing Homebrew…
remote: Enumerating objects: 290242, done.
remote: Counting objects: 100% (314/314), done.
remote: Compressing objects: 100% (205/205), done.
error: RPC failed; curl 92 HTTP/2 stream 5 was not closed cleanly: CANCEL (err 8)
error: 1277 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
Failed during: /usr/bin/git fetch --quiet --progress --force origin
slam@Stanislavs-MacBook-Air ~ % brew
zsh: command not found: brew

Looks like your network failed when installing it. Or something is blocked on your network maybe. Definitely some internet connectivity issue.