Yes, you can take the exclusion again if you sell your new principal residence in the future, provided you meet certain conditions.
According to § 121(a) of the Internal Revenue Code, a taxpayer can exclude gain from the sale of a property if it has been owned and used as the taxpayer's principal residence for at least two years during the five-year period ending on the date of the sale. However, § 121(b)(3) specifies that this exclusion can only be applied to one sale or exchange every two years. This means that if you have excluded gain from the sale of your former principal residence this year, you must wait at least two years before you can exclude gain from the sale of your new principal residence.
Additionally, IRS Publication 523 confirms that you can take the exclusion again if you sell your new principal residence in the future, as long as you meet the ownership and use tests and have not excluded gain from the sale of another principal residence within the two-year period ending on the date of the sale.
Therefore, as long as you satisfy the ownership and use requirements and ensure that at least two years have passed since your last exclusion, you can exclude the gain on the sale of your new principal residence in the future.
Sources:
Publication 523 (2023)
§ 1.121-1. Exclusion of gain from sale or exchange of a principal residence.
PLR 200615011
§ 121. Exclusion of gain from sale of principal residence
Rev. Proc. 2005-14
§ 1.121-2. Limitations.