Singapore's HDB system is world class in this regard.
Key items being first time owners are highly prioritized (effectively no one else). Must be owner occupied for first 5 years before allowing rental or resale. Government sets initial sale pricing to be quite affordable with special loans being cheap for the BTO. Average 2 year wait from lottery to build. Was 5 during covid.