I spent a few days researching whether there was a way to limit Firebase's revenue, afraid that when I put the project into production some error would increase the cost and end up suffocating my finances.
So talking to an Artificial Intelligence, the idea came up to put the following code in the rules:
allow create, delete, read, write: if request.auth.uid != null && request.resource.data.billing_amount <= <Limit value>;
Of course, one day I would change this rule, otherwise the project will never grow, but I personally found it interesting so as not to kill the project due to a mistake that would increase the completion rate so much that I wouldn't be able to afford it.