What type of screws should I use in framing an area for a drywall patch?
It sounds like you need a screw primer.

Strength is of very little importance here. There will be no serious loads on these screws. So anything that goes through the 2x4 into the existing framing. Since 2x4 stock is only 1.5 inches thick, you need a screw at least 1/2 inch longer than that. A really long screw is a detriment here, since it takes longer to drive, more friction, etc. So is a thick screw. I'd buy 2 or 2.5 inch screws for this. Since you will be drilling at an angle through the wood, 2.5 is probably better. Again, you don't need the holding power of a 3 inch long screw here.

Wire size is important. This defines the thickness of the screw. You will see numbers like #6, #8, and #10. Bigger numbers mean a thicker, stronger screw, that will displace more wood fibers. So thick screws take more effort to drive, but they are stronger. Requiring more effort to drive means it wears out your arm and the battery in your driver more quickly. Typically, you will be able to buy screws in a length of at least 2 inches as #8 screws. Even a #6 screw would be entirely adequate here.

Next, I'd go with square drive (Robertson drive.) A square drive screw is nice, in that you can stick it on the end of the bit, and it will stay there without you needing to hold onto the screw. It is better when you are working in tight places. Square drive screws are far less likely to strip out the head (cam out) than are Phillips drive screws. Believe me, once you use square drive, you won't go back.

There is no need to pre-drill holes for these screws. Pine 2x4 stock is soft as screws go. If I was putting a 2 1/2 inch screw through that much dry white oak or rock maple, a pilot hole would be necessary, even mandatory. Not here.

How will you drive these screws? A manual screw driver will work to drive a couple of screws. But I'll quickly grab a battery powered drill or even a powered screw driver for a job like this. 12 volts is nice, but 14.4 or 18 volts is better, but heavier. Remember, smaller batteries mean occasional recharges and battery swaps, but a lighter tool.

Finally, there are many stainless screws you will find on the market. Stainless steel is great for some applications, for example exterior decking, driven into pressure treated wood. But stainless is relatively soft. I can tear off the head of a stainless deck screw if I over-torque it. Just get a basic steel screw, made for general construction application.