You do not need outdoor space to keep food scraps out of the bin. A small countertop caddy with a lid handles daily peelings. A sealed bokashi or worm bin can sit in a flat without a smell if you keep it closed and empty it on schedule. If your council runs a food waste collection, that is the easiest route of all and costs nothing.
Composting food scraps at home turns a waste problem into soil, or at minimum into a lighter general-waste bin that you put out less often. The trade-off is time: a worm bin needs a few minutes a week, a caddy needs emptying every two or three days, and a council collection needs you to remember the night before.
If you rent, check whether the bin can live under the sink or on a balcony before buying anything. Most landlord restrictions do not block a sealed indoor bin, but the space you have usually decides the method. Our composting page sets out the options by space and weekly effort.