Simple, use services providing a fixed price like DigitalOcean, with services with variable cost like Github Actions, we just set a monthly limit. I avoid services where this isn't possible unless I'm confident that there is no way to get into a huge bill.