Attic joists for live loads.
2x12 floor joists for attic room above garage.
First floor live loads have higher requirements than second floor live loads 40 pounds per square foot vs.
You also need to ensure that the joist spacing is adequate.
A room used solely for sleeping might need to carry only 30 psf whereas a garage floor over a basement would need 50 psf or higher.
An inaccessible attic space on the other hand might have a live load of only 20 psf.
Standard joist spacing for the installation of attic flooring materials is 16 inches on center oc meaning the distance from the center of one joist to the center of the next joist is 16 inches.
If you need a storage area above your garage strong ceiling joists are necessary to support the added weight.
My calculations tell me assuming 2 southern yellow pine joists which are common in my area that 2x6s 16 inches on center will span 9 feet 9 inches with allowable deflection being the governing factor.
The wooden joists or beams over your garage help hold your roof in place.
Joist dimensions are only part of the equation.
Attic joists that are made from 2x8s may be acceptable for building your attic floor but because every room is variable there are no absolutes.
If you have an attic over your garage these joists also bear the load of your attic flooring and any materials you store in the attic.
The rest of the space is situated over the laundry room to tap into existing pipe chases.