Possibly so. However, the courts have ruled that that limit is unconstitutional.
Laws preventing firearms dealers from selling handguns to young adults under age 21 are unconstitutional, a federal appeals court said Tuesday in a ruling that could have implications for efforts to restrict such sales nationally.
In a divided decision, a three-judge panel of the U.S. Court of Appeals for the 4th Circuit said the existing minimum age requirement for purchases from federally licensed gun dealers restricts the rights of law-abiding citizens and draws an arbitrary, unjustified line.
“Despite the weighty interest in reducing crime and violence, we refuse to relegate either the Second Amendment or 18-to-20-year-olds to a second-class status,” wrote Judge Julius N. Richardson.
The decision, which probably will be appealed to the full court, finds that 18-year-olds possess a Second Amendment right to gun ownership and notes that they were “required at the time of the Founding to serve in the militia and furnish their own weapons,” wrote Richardson, a nominee of President Donald Trump, who was joined by Judge G. Steven Agee, a nominee of President George W. Bush.
Admittedly the case is going to be appealed, but, with the current make-up of the US Supreme Court, the odds are that the decision will ultimately be upheld.
PS - My apologies for referencing a court case that is only three days old and which you probably had never heard of.
PPS - Please note that I never said that it was NOT "illegal" for persons under 21 to purchase handguns, only that those laws which made it illegal for persons under 21 to purchase handguns had been found to be "unconstitutional" and (under US law) if a law is "unconstitutional" it is a nullity.