I want to publish a website using firebase but I have the following questions:
Please visit the Firebase Pricing Site
Yes you can use a custom domain name after deploying the website. There is an opportunity in the Firebase console "Add Custom Domain".
You will have to pay for the services when you exceed the free reads etc. in the free firebase plan. But you have to switch to the Blaze Plan first. When you didn't switch to the Blaze Plan, you will just get no more answers from the database etc. after exceeding the free plan.