Why does my terminal show % instead of $? (macOS Big Sur)
I can't find an accepted answer to dupe this to, and since it's always been answered in comments, I'm going to make it a real answer so we can point people here. (Yes, it should be on Ask Different, but it gets asked here a lot.)
See macOS different Prompt meaning `%` vs `$` and Updated my shell to zsh, command prompt now ends in a % for a couple of recent versions.
You've switched from bash to zsh (this became the new default in 10.15), and zsh has a different default prompt. The commands you find online will still be fine. You don't type the leading $. That's just indicating where the prompt is (and in zsh it's %).
If you wish to switch back to bash, use the following command to change your default shell:
chsh -s /bin/bash