No person may sell, deliver, or otherwise transfer a handgun or ammunition suitable only for a handgun to someone the transferor knows or has reasonable cause to believe is under the age of eighteen. 18 U.S.C. § 922(x)(1).
A federally licensed firearms dealer may not sell any firearm except a shotgun or rifle to any person whom the dealer knows or has reasonable cause to believe is under the age of 21. 18 U.S.C. § 922(b)(1).
“Some states have issued more restrictive laws considering minimum age for firearms sales, such as 21 for handgun sales. You should check your state laws."