Garage conversions are usually the cheaper path, and the reason is exactly what you said: foundation, walls and roof already exist, and those are big line items. The catch is that an existing garage was built to garage standards, so bringing it to habitable standards is where the budget lands.
The common costs on a conversion: plumbing run from the house or the street to a new bath and kitchen, which means trenching and a sewer connection. Insulation in walls, roof and often the floor, since an uninsulated slab is cold and may not meet energy code. Electrical, usually a subpanel and sometimes a service upgrade at the main house. Ceiling height, since some garages are too low once you add floor assembly and drywall. Replacing the garage door opening with a wall and windows. Egress windows in any sleeping room. Then permits and any impact fees the city charges for a new dwelling unit.
Realistic total for a conversion in a moderate-cost market often lands somewhere in the $80,000 to $150,000 range, and prefab detached units commonly start near $100,000 for the shell before site work, with all-in ADU costs across the country running $100,000 to $250,000 or more. Site work on prefab is the number people forget, foundation, utility trenching, crane or delivery access, and it can add $40,000 or more.
Before you price anything, check whether your city requires replacement parking when you remove a garage. Some ordinances waived that, many didn't, and a required new parking pad can cost more than the item you were trying to save on. Ask the planning counter that question by name.