Spanish is spoken across two dozen countries, and the accents vary — but they're all mutually intelligible.
A quick tour
Spain's regions, Mexico, the Caribbean, Rioplatense (Argentina and Uruguay), the Andes, and more — each has its own rhythm and music. None is "correct"; they're simply different.
Features you'll notice
The "th" sound of much of Spain, the aspirated or dropped s of the Caribbean, and the "sh" sound and voseo (using vos for "you") of Argentina are among the most audible markers.
It's all still Spanish
Accents differ; the language doesn't. A speaker from any region understands the others — the differences are texture, not a barrier.
Which to lean into
Exposure to the accent of wherever you'll use Spanish trains your ear for it, but there's no need to over-worry this as a beginner — understanding one accent well transfers to the rest.

