Okay, an article goes before most nouns. Congratulations! Very good! You are on the way to understanding articles.
Now, how do you choose between a definite article (the) and an indefinite article (a/an)?* Here are some tips.
Basically, If you are introducing a thing or an idea, then an indefinite article is the proper one to use. If the item or idea has been introduced and you talk more about it, then use a definite article.
Example: I needed a new shirt, so I went to a store to buy one. When I was in the store, I found just the shirt for me. It was my style and my size, so I bought it. After I paid for it, the cashier put the shirt in a bag.
Example: Last night, I had a dream. It surprised me. In the dream, I was a superstar, and had super powers.
If a person has an idea or a picture of the noun in their head, then it is likely a definite article is the correct choice.
*This blog addresses single nouns. Plurals do not require “a” or “an”.