Don’t confuse a bad work environment with not liking or being suitable for your job.
If you liked programming, do your work in the way that made you originally liked programming. People will put pressure on you to just “do things”. Don’t. Ensure you start understanding, slowly get more insight into what’s going on. Ask the people around you any and all questions you need to get more understanding. Allow yourself to learn. That is the only way to start feeling in control, and the only way to become ‘more senior’.
That being said. If you want to move on, there’s no harm, and no shame. Just do it because you’ll be doing something you know you will like better.
Just care for your team.
Realise you need to spend most of your time working with your more junior developers, making sure that they understand the problems they’re solving, doing some whiteboard-design sessions, jumping in and pairing frequently to teach them as well as keep things going in the right direction. A lot of that is giving your team enough confidence that they’re going in the right direction that they can make the decisions they need to make.
But you should not see yourself as someone that picks up tasks and gets things done by themselves. You need to work through your team. That can be difficult. And if the team gets larger, that gets even more difficult! You’ll need to find some seniors you can trust, and use them to pick up some of that leadership/guiding work. You will run the risk of getting further removed from the practical technical work, and will have to find a balance. You’ll probably be doing more work around the team than in the team. Maybe get involved with planning more.
But the most important thing is the above: make things clear for your team(s), don’t leave them guessing about the direction, but don’t prescribe the solution too much, teach as much as you can, but give people room to make their own decisions too.