A player is allowed on the practice squad for up to two years, with one year counting as six weeks in a season. A third year on the practice squad is only allowed if the team keeps 53 players on their active roster at all times (which every team does).
https://www.google.com/amp/s/www.cincyjungle.com/platform/amp/2018/9/1/17808772/nfl-practice-squad-2018-eligibility-pay-rules-changing-teams-what-to-know