Is it allowed/does society and laws allow for example a 17 year old to have sex with for example a 22 year old? (In America)

Really wanna know what you guys think.
Nothing is forced everything just fine and normal. But as long as I know you're not allowed to have sex with a person who's older then 21 when you're a minor.