Townhouses are super
Townhouses are awesome, especially mixed use ones! They cut out some of the unnecessary & wasteful stuff that detached homes have and add some stuff that they're inherently incapable of having. Townhouses are multi-story buildings that sit right next to the building on either side. Often, they have backyards (or rooftop patios) and garages. If they are mixed use, they have retail or office space on the ground floor. They represent a great compromise between single family detached homes and residential high rises.
What they get rid of:
Townhouses get rid of wasted space. They get rid of the space beside detached houses that often have no windows and function for little more purpose than to transport the garbage can from the backyard to the front of the house once a week.
What they add:
Townhouses have some features that detached homes just can't emulate. They can fit into smaller spaces, so they can be a part of more varied neighborhood without breaking it apart. They add density and provide boundaries to a street.