I guess it just depends on where you live, what kind of person you are, and who your neighbors are. When we got married, we lived within the city. It was a neighborhood built after WWII. 720 sq ft house. 12' setbacks, so you were 24' from your neighbor. I've told this story before; if I was sitting at my kitchen table eating breakfast with the window open, and my spoon clinked in my bowl, I could usually expect to hear "Watcha havin for breakfast?" from my neighbor Ben. I'd tell him cereal. And he'd reply with something like "Irene made pancakes. Want some?" Then we'd have a conversation about whatever was going on today which was usually about me going to work and him going fishing. (they were a retired couple). Once in a while I'd take him up on the pancake offer and Irene would meet me at the fence with a plate of pancakes.
We'd go on drives with them on weekends, or I'd go fishing with Ben. Irene and my wife would trade pies. It was pretty nice. It seemed we were the youngest couple on the block and it got out that I repaired TVs and we were good people. So, we became friends with several of the retired couples and single people on our block, and the surrounding blocks. They'd mow my side yard in summer. I'd do their snow in the winter. A lot of free beer, too!

Over the years many of them passed away, their surviving spouse would move away with a child or retirement community, etc. We wanted more children and needed/wanted a larger house, so we moved, too.
So where we are now, the houses are a bit more spread out. Most are 1/4 acre lots. We are on a quad lot, so a tad over 1 acre. Again, most of our neighbors were older and we immediately got on good speaking terms with 7 out of 8 of them (1 has mental/alcohol issues, so pretty much no one interacts with them). We always speak with each other, share garden harvests, help each other with large projects, etc. When new people move in, we always wave. Eventually we'll meet at the mailboxes and start talking.
And, a few times we've helped out with house fires and medical emergencies, as well as storm damage.
So a lot of it depends on a bit of luck and your own personality as to if you're gonna get along with your neighbors or not. In close quarters, it makes things go a lot smoother if you're friendly and interact with your neighbors in a positive manner. We've had many a good laugh with our neighbors, and shared their pain in times of hardship. I know we are lucky, but we also work at it.
I don't think we could live in an apartment with shared walls, but a town house or duplex with a shared garage wall would not be bad at all.