I can't understand when to use un and une
Whether un or une is used depends on the gender of the noun. The gender of a noun is unique to each noun.
Un is masculine, while une is feminine.
Wether to use each one depends on the sentence
une is for girl and un is for boy
I didn't get it wrong here. They match exactly