https://operations.nfl.com/journey-to-the-nfl/the-nfl-draft/the-rules-of-the-draft/
To be eligible for the draft, players must have been out of high school for at least three years and must have used up their college eligibility before the start of the next college football season. Underclassmen and players who have graduated before using all their college eligibility may request the league’s approval to enter the draft early.
Players are draft-eligible only in the year after the end of their college eligibility. ...
----------------
https://www.nfl.com/news/2023-nfl-draft-underclassmen-tracker-who-intends-to-enter
Who can enter the 2023 NFL Draft? Players who have completed four years of college football eligibility are considered eligible for the draft. Underclassmen must be out of high school for at least three years before they can request the NFL's approval for special draft eligibility.