This is very close to something that happened to a friend of mine. They were trying to follow a MoltBot installation guide, but clicked on a different link that looked legitimate. That page instructed them to paste a command into Terminal.
After running it, macOS immediately started asking for multiple permissions, which in hindsight was the big warning sign.
But for someone who is non technical might have ran with it.