If there is a garbage disposer, use that. If not, put the waste in a ziploc bag and put that in the refrigerator.
We have an open air house and put the food trash in the trashcan in the kitchen - it’s the type where you step on on the flap by the floor and the lid pops up. Yes, the ants can find the food there, too. But the ants are really tiny and easily managed, so it isn’t a big deal.
The ants need to be given a more attractive target than the food or they need to create a barrier around the house (insecticide). “Terro” liquid ant bait works great (Home Depot/Lowes) - it’s boric acid (Borax) in sugar water.