As long as the beer or alcohol is sealed and unopened and the bottles or cans of beer or alcohol are full then you can legally drive the vehicle as a minor with a parent, guardian or someone that is 21 years old or older.
If you're under 21 and driving the car alone you cannot carry alcohol in the vehicle even when it's closed so if you plan to drive a vehicle and are under 21 and there's sealed alcohol in the car you need to remove it before driving.
Otherwise if pulled over and the police spot it then you can get a fine and have to go to court.
But you can carry the alcohol as a minor in the vehicle as long as someone 21 or older is with you.