In order to use attic as a source of combustion air for your water heater you have to provide two openings between the WH closet and ventilated attic area. One of those openings shall end 1 foot above the floor (air inlet) and the other must be installed at the ceiling level (terminate within 12” from the ceiling).
Both openings must be sleeved (metal pipe usually serves as a sleeve) and extend a minimum of 6” above the ceiling joists… I’d make it 6” above the insulation level if that one is higher. Screens are prohibited on combustion air vents leading to the attic and the minimum required air flow area of each vent is 1sq inch per 4K BTU’s.
For 38K BTU’s you’d need approximately 10sq inches inlet and outlet (3” diameter pipe has 7.065 sq inch, 4” pipe has 12.560 sq inch air flow area) so you need two 4” diameter galvanized pipes.
Let me know if you have any additional questions,