Perpendicular set studs sometimes shift during toe nailing to flat plates, top and bottom. Is there a way or a tool to clamp 2x4 perpendicular?
Measure and mark your stud placement on both plates and make sure the studs are on the marks when you nail them.
Generally, I lay the plates next to each other with the ends aligned. Then mark and strike the line across both simultaneously. Don't forget to mark which side of the line the stud goes on.
I think what you're asking about is toe nailing
It's a very basic method of nailing things together but there is some knack to it. The stud does want to move laterally from the intended spot. There are a few ways to counter that.
The name "toe nailing" comes from maybe the most basic way to keep the stud from slipping:
That kind of works, but it's pretty awkward and there's lots of situations where you can't get set up that way.
It's simple enough to build a jig to hold the stud in place. The one pictured below would be cut to 14.5" for studs spaced 16" on centers.
Of course that won't work where the studs are not spaced at 16".
You can find lots of other jigs for toe nailing but I personally just start nailing with the stud a little off the mark and let it slip into place as I nail. This is not a perfect method but with a little practice it's good enough. If I am struggling I'll start a nail into the plate on the mark to keep the stud from slipping - just a half inch or so in - and remove it after the other side is nailed.