“a” or “an” (for words that begin with a vowel sound) = “un” for nouns that happen to be masculine in Spanish and “una” for nouns that happen to be feminine in Spanish
“the” = “la” for Spanish feminine singular nouns, “el” for Spanish masculine singular nouns, “las” for Spanish feminine plural nouns and “los” for Spanish masculine plural nouns
In a phrase, translate exactly. When to use definite articles rather than indefinite articles in a sentence is sometimes different from one language to another.
I live in California, but there is a difference between a grocery store, a market and a supermarket in English too. So why not learn the correct words for each? A market is “ un mercado”. A grocery store is “una tienda de comestibles”. I often say “I’m going to the store.” even if I am going to the supermarket. In Spanish, you could use “la tienda”, but when someone bothers to say “a supermarket,” then we now know it is “un supermercado.” Translating a specific word to a general word is not a good idea, but keep in mind that you can use a general word if you choose when traveling. A grocery store even translates differently in different countries. https://dictionary.reverso.net/english-spanish/A+grocery+store