a visa has a period of validity before expiration. Thus allowing you time to enter the country. Be happy they don’t make the assumption that you will use the visa straight away, or they may have denied your visa
you should get a letter with your new passport, and you take the letter and both passports to Thai immigration to have the visa transferred to the new passport.