Rookie Qualifications
To be considered a rookie, a player must not have played in more than 25 NHL games in any preceding seasons, nor in six or more NHL games in each of any two preceding seasons. Any player at least 26 years of age (by September 15th of that season) is not considered a rookie.
https://www.nhl.com/info/hockey-operations-guidelines#rookie