A synecdoche can either be when you use a part to represent the whole, or conversely use the whole to represent a part

I think it’s valid to consider the US government a part of the US. Thus, referring to the US government when saying that the US did something is a synecdoche