Panama had dealt with Taiwan, the seat of the original Chinese government, ignoring the claim of Beijing's 'One-China' up until this week.
China has done quite a bit of investment in Panama in recent years.
Now Panama has cut off relations with Taiwan in favor of Beijing. Most countries have now done this. Canada did so in 1971 and the U.S. did so in 1979.
Taiwan still has non-diplomatic, unofficial governmental relations with the European Union and at least 47 states, including Canada and the U.S.