There are two different things people in Brooklyn call a "food handlers certificate," they cost very different amounts, and knowing which one a job is asking for saves you both money and a wasted trip. New York City runs its own certification and does not accept the national ones in its place.
The one the city legally requires is the NYC Food Protection Certificate, issued by the Health Department. The Health Code requires at least one supervisor holding it to be on site the entire time a food service establishment is operating -- so every restaurant, mobile vendor, ghost kitchen and caterer in Brooklyn needs somebody on every shift who has it. It is not required of every employee individually, which is the detail most listings get wrong.
The other is a basic food handler card from a national provider such as ServSafe or StateFoodSafety. It runs roughly ten to fifteen dollars, takes about an hour fully online, and NYC does not accept it as the supervisor certificate. Plenty of Brooklyn managers still ask for one as a condition of putting you on the schedule, because it shows you have had the basic training. If a listing just says "food handler's certificate required," this is almost always what they mean -- get it the same day and move on.
Get the real NYC certificate if you want to be a shift lead, kitchen manager, chef, bar manager or opening or closing supervisor, or if you plan to run your own food business. A certificate on your resume makes you more valuable to a small Brooklyn restaurant than the same resume without one, because it means the owner can leave you alone in the building.
The course is free and online. The city's Health Academy publishes a self-paced course of fifteen lessons, each with a quiz you have to pass before the next one opens. It is offered in English, Spanish and Chinese. If you would rather sit in a classroom, the in-person version is fifteen hours over five weekday afternoons, but it costs $114 for course and exam together -- there is no reason to pay that unless you learn better in a room.
The exam is the part that costs money and the part people get caught by. You have to take it in person. The base price is $24, with a small card processing fee, and you schedule your appointment at the end of the online course. The study guide and exam are available in English and three dozen other languages, so take it in the language you read fastest.
Plan for the trip, because there is no Brooklyn testing site. The two exam locations are the NYC Health Academy at the Riverside Health Center, 160 West 100th Street in Manhattan, and the College of Staten Island at 2800 Victory Boulevard. From most of Brooklyn the Manhattan site is the realistic option: it is a 2 or 3 to 96th Street and a short walk, so budget an hour each way from Downtown Brooklyn and more from Bay Ridge or Canarsie. Book a morning slot and do not schedule a shift on top of it.
You walk out with a temporary certificate the day you pass, and the permanent one follows. It is good citywide at any permitted establishment and it does not expire, so this is a single afternoon of effort that you never repeat -- unlike the alcohol-training certificate, which most bars want renewed.
Before you pay for anything, ask the employer which certificate they want in hand. A dish or prep job that wants to see a ten-dollar online card is a different errand than a lead line cook role that wants the city certificate, and no Brooklyn restaurant will turn you away for showing up with both.