Type of screws for 2x4 shelves and benches
Do not use drywall screws. They are thin bodied and brittle. They hold because there is virtually no dynamic load and the load is spread over many screws on many studs.

I would favor construction screws, although deck screws would be fine. You can find both types with drill point tips that make predrilling unnecessary except in harder materials (such as hardwood or mdf).

Most carpenters have moved to star (Torx is a brand) over phillips, although some modified phillips (such as Pozidriv or Supadriv) have advocates, but they need special bits and screwdrivers to work at their best.

Length of screws should be determined by the thickness of the wood you are attaching. It is bad form (and dangerous) to leave tips protruding because of overlong screws. If you need to go through one 2x in places and two 2x in others, use different length screws. Usually if there is a pair of studs that are already attached, any OSB panels would likely only need to go through the stud it is facing, not the sister stud. Screws can probably be the thickness of the OSB + 1 to 1 1/4 inches. The screws to sister 2 2x studs should be 2 1/2 inches (2 3/4 would be fine, but an uncommon size)