Check whether your compost has the right balance of "green" and "brown" material, based on weight.
"Green" material is nitrogen-rich and gives the compost nutrients and moisture — examples are kitchen scraps, grass clippings and fresh garden waste. "Brown" material is carbon-rich and gives structure and airflow — examples are dried leaves, twigs, paper and cardboard.
A common rule of thumb is to aim for roughly 1 part green to 3 parts brown (by weight). The right balance gives faster breakdown and reduces the risk of the compost smelling bad or becoming soggy and anaerobic.
"Green" is nitrogen-rich material like kitchen scraps, grass clippings and fresh garden waste. "Brown" is carbon-rich material like dried leaves, twigs, straw, paper and cardboard.
Bad odor usually comes from too much green/wet material relative to brown, which causes poor airflow and anaerobic breakdown. Add more brown material and turn the compost to aerate it.
It varies a lot, but typical home composting takes about 6–12 months, depending on balance, size, temperature and how often it's turned.