As it’s been explained to me (I just bought my first home), the first 500k of capital gains on a primary residence are tax exempt.
FWIW in Canada capital gains on a primary residence are completely tax exempt and their housing market is even more of a mess than in the US.