I have this problem sometimes. I don't blame MS. I think mine comes from having covid two years ago.
YES years ago during the early stages of my diagnosis. I was so frustrated because I had just went to Dairy Queen for the half off sale. I bought a few items,put them in the freezer couldn't taste any of them. This tasteless situation lasted for a few weeks. Then it just came back one day. I don't recall what MS medication I was taken at that point in time. If I had to quess it was Tecfidera. I had alot of emotions going on because I was cook and you have to taste your food. I prayed it taste good and cooked from the previous knowledge of what I knew.. To be completely honest I don't think it was any medication that caused it. I believe it was the MS it self. Maybe that is what happens in some forms or stages of this. I hope this brings some clarity to you in some way.