This is the sorta thing I do, and you're going about it the hard way. Don't just buy the cabinet doors, buy the cabinet too. Keeping your eyes open for what people put at the curb can get you the best price. Cut the hole to ft the cabinet you 'buy' and slide it in. Violets!
Now I trusted your judgement that there were no studs of any importance, but best if you cuts as few as you can in any case, and slide the cabinet right beside one of them. You'll want to add a new one on the other side to anchor the floppy drywall edge, and then bridge across between the two at the top. Best to make that opening a tad larger than the cabinet, tad being a precise measurement of how accurately you can cut and and how plumb and level (we trust you own squares, levels, and such) you build Do not imagine a 24" box will ever slide into a 24" hole; I'd want a half inch. After you have inserted the cabinet, shim it level and plumb and screw it sideways into the studs thru the shims, then trim the raw edges as you please. There's an edging for drywall to let it butt on the cabinet if you don't want moulding.
Didn't want the cabinet closing you out of that space under the stairs? Keep about 6", and saw the rest of it off just before slide it in for the last time (making sure there's some fasteners to hold what's left together) What you're actually asking above is how to build that 'cabinet' on which the door is hung, and which dresses the rough opening—it's called the jamb assembly. If you really have those skills go ahead and build one, just use 1x3 to 1x6 instead of cabinet width panels.
Unless you've followed all this and visualized only Robertson screws, you are not ready. If you have, go for it; drywall can be patched.