Apartment composting is less a single method and more a set of small-space strategies. You can keep food scraps out of the trash even without any outdoor area.
Your options
A worm bin fits under a sink or on a balcony. A sealed countertop pail (or storing scraps in the freezer) lets you collect waste for a drop-off site. Or a curbside pickup service handles everything after you fill a bucket.
Pros and cons
These methods make composting possible for renters, though indoor systems need a little care to stay odor-free. We wrote a full guide on composting in an apartment.