Registration works, but getting error "Email already taken"

I figured out what caused this.
I hadn’t set up an email provider. And using Strapi’s default configuration didn’t work on localhost. I’ve now set up the Sendgrid provider and everything works as expected.