How can I avoid being assigned a manager who is managing people for the first time? This happened to me and my colleagues multiple times and it was always extremely stressful and unpleasant to work with someone who is managing people for the first time.
I know this would never happen to a staff engineer or a tech lead, but I'm mid-level.
Should I ask to move to another team? What reason should I give for wanting to switch teams?
(To provide an anecdotal data point to the scenario you're running into, I got my senior level promo with a first-time manager)
Getting a new manager who's new to management leaves a fairly unclear path, especially if you're a mid level trying to grow to senior. You mention that working with these managers are often times stressful and unpleasant for you, but why is that so? Are there any common patterns around behaviors you can provide a general summary for? I would go through this exercise and then talk to your skip manager about your past experiences with first-time managers and talk to them about the common themes you're identified around why those experiences weren't great. You can also look to talk to your skip around what support is being provided for your new manager: getting a clearer view around the support system for your new manager might help give you some relief that your new manager isn't just going into management blind.
This isn't always necessarily a bad thing, it depends on your company culture. I would say unless you have good evidence, give the new manager a try. If it ends up being a bad fit, transfer teams, but don't do so until you're sure that the current manager is poor and the alternatives are good.
From my experience, if it's a manager without experience, you get more autonomy. They have less experience, often less expectations, and rely on you more to take charge. This is a great opportunity to better advocate for work you want to do and push back on things like timelines and priorities you think are detrimental to your work and organizational goals. It is also easier to stand out since other team members may not be able to make use of the opportunity as much as you are.
However, if the manager is purely HR related and doesn't overlap with your actual work and priorities, then my point is less relevant.