Working in software might seem like a dream to most introverts and anti-social types. I know, I used to keep to myself much more than I do now. I loved it. Sit there and work by yourself for hours on end.
I still love that part, but that's not the endgame for any job in software. To make good software that provides value to customers and users, you must collaborate and communicate well.
Because I've only been working remotely for the last 18 months, after 15 years of working in an office, I can easily see the pros and cons of each:
High bandwidth interactions
Get a lot done in a short amount of time when in the same physical space
Office space provided for you
Planning to bring everything you need for the day
Distractions from coworkers
Personal task flexibility
Solitude (assuming you don't have a SO or roommate working in the same room)
Nobody looking over your shoulder
Communication takes an extra effort
Always "on" (especially video) to seem more included instead of just a voice in a Zoom
Separating work and home, both physically and in your schedule
Really, it depends, but this is the approach every software professional should take if they want to get into flow with their work:
SPECIALIZE AND NICHE
What does that mean?
Specializing is choosing an aspect of software you enjoy and dive deep on it. It could be a specific technology that solves a problem: React, Vue, etc. Or it could be a platform like AWS or Azure. Maybe you love persistence (databases) and want to be an expert at that.
Niching is being the software expert for an audience. Maybe all you want to do is work on improving the healthcare business. Or maybe you love sports and want to work with that. No matter, just choose something that speaks to you and you'll both enjoy what you're doing more AND you'll be easier to hire.
In the end, don't target a role or technology that doesn't speak to you and choose an industry that speaks to you. Life is too short to act like you're someone you're not. Go for it.