I built my garage with thousands of dollars worth of "scrap" lumber taken from jobsites.
Need a 4 foot piece of 2x4? Just cut it off a 12 footer and throw the 8 foot piece in the scrap pile.
I got lots of "short" pieces of 2x6 and 2x8 that I used as blocking between rafters and huge scrap pieces of OSB that I used as sheathing,filler panels, etc.
I even got full and partial coils of gun nails tossed in the scrap pile.