Permission denied

Hello, I have been working on an app and I started by registering and logging in through tutorials on YouTube (since I don’t know how to make an app), when creating a registration in the application, complying with the data that I require the message “PERMISSION_DENIED: Permission denied” comes up and I suppose that your record has not been created in the database but when you press the register button again it says "the email address is already in use.

The second problem is that in my application I ask you to enter the name, grade and group as data; but it is not saved in the database.

What can I do with these two problems?