Typically, when Microsoft adds a game to Game Pass, it's a 1-year contract or multi-year contract in multiples of a year. However, there are exceptions. And often these exceptions concern games published by Take-Two.
Grand Theft Auto V and Red Dead Redemption were added to Game Pass for less than a year – for 3 or 6 months. It looks like NBA 2K24, which was added to subscriptions this week, will be much the same.
One player on Reddit reported that they received an information notice from 2K, which states that NBA 2K24 will be on Game Pass until August 31, 2024. This information has not yet been officially confirmed by Xbox.
Note that a similar situation occurred with NBA 2K22. The game was added to the Game Pass subscription in April 2022, and removed from the service at the end of August of the same year, a few days before the release of the new part of NBA 2K.