Yes and no. The essential grammar is the same, but the pronunciations and some vocabulary vary from country to country. I often tell students that this also true in the USA, just one country! We have a lot of regional accents: Listen to the difference between the accent of a person from south Georgia vs. a person from Boston, MA. We also have different words for the same thing. For example, a soft drink may be a soda, soda pop, pop, drink, or Coke.
I lived in Spain for a year and have been there five times in my life, but here in the US, where I have lived all my life, I have mostly worked and spoken with people from Central America, South America and the Caribbean. The accents certainly vary. In most of Spain, Castilian Spanish is spoken, in which all z's as well as c followed by e or i as pronounced as a "th". Everywhere else, these are pronounced like an "s". The letters ll and y vary; they can be pronounced like a y, and English j, or the s in "pleasure." The Spanish J (jota) is very strong and guttural in Spain,(probably due to long-term Arabic influence), aspirated in other places, and pretty much like an English h in the Caribbean.
Some words are different, especially foods. This could be due to the fact that there are more varieties of a particular item in one location than in another. I learned the word, "frijoles" for beans, only to find out that in Puerto Rico, they have "gandules," "habichuelas," and more. Beyond foods, for example, in Spain, the word for "wife" is "mujer" (which also means "woman,") but most other countries would use the word, "esposa." Likewise, ¨husband¨ is "marido," but everywhere else it is, "esposo." In Spain, the word for "car" is "coche," but in most other countries, they say, "carro." I believe ¨coche¨ can mean something like a grocery cart or baby stroller in some Latin American countries, so conversations could be amusing!
The plural of both ¨tú¨ (you informal singular) and ¨Ud.¨(you formal singular) is ¨Uds.¨ in all countries except Spain, where they use the word, ¨vosotros,¨ (you informal plural). This word also has its own verb endings. Because it is only used in one Spanish-speaking country, and the majority of Spanish-speaking people here in the USA are from Latin America, sometimes it is omitted from curricula in the USA, or briefly introduced but not really used.
There are a couple of grammar options that may have regional differences. For example, the position of direct and indirect pronouns. In Spain, they are usually placed before the conjugated verb, but in other places they are attached to the infinitive. Spaniards tend to use the present perfect tense while Latin Americans might use the preterit, preceded by the word, "ya".
There are more examples, but I´m sure you get the idea.
It's interesting, isn't it?