Deductions & credits

Another question..........what I stated in my first question still stands...however, I had bought another home because I was selling the prime residence.  I bought that in August 2019, began living in the home October 2019.  When can I sell the second home to avoid paying taxes on any capital gain.  The primary home that was  sold in 2020 was sold for less than $250K so there was no exclusion taken on this home on my 2020 taxes.