Spanish from Spain or from Mexico. Portuguese from Portugal or Brazil. Standard Arabic or a spoken dialect. The question stalls a lot of beginners, and for most languages it matters far less than it feels like it does.
For most languages, any variety works
Someone who learned Mexican Spanish will be understood perfectly in Madrid. The differences are vocabulary, some pronunciation and a couple of verb forms — noticeable, never a barrier. Start with whichever variety your material and your contacts use, and adapt later. Adapting is a matter of weeks; choosing wrong is not a real risk.
Arabic is the genuine exception
Standard Arabic is the language of writing, news and formal speech, and nobody speaks it at home. The spoken varieties differ enough that choosing matters at the start. If you have a specific country in mind, learn that dialect for speaking and Standard Arabic for reading. If you do not, Egyptian and Levantine are the most widely understood starting points.
Let your reason decide
If you are learning for a place, learn that place’s version, including its slang and the way people there actually greet each other. It is the fastest route to being treated as someone making an effort. If you have no particular place, take the standard form. It is what most courses teach, it appears in most written material, and it is understood everywhere.
Do not mix deliberately, but do not panic
Speaking a blend of varieties is mildly odd rather than a problem. It marks you as a learner, which you are, and nobody minds. What is worth avoiding is switching your listening material constantly at the beginner stage. One accent in your ear for the first few months builds recognition faster.
Pick the variety closest to why you are learning, and stop thinking about it. For everything except Arabic, the choice is much easier to change later than it looks now.