gegen
against
Expresses resistance, opposition, or competition.
Deutschland spielt heute Abend gegen Frankreich.
Germany is playing against France tonight.

against / around
Loading your saved state.
against
Expresses resistance, opposition, or competition.
Deutschland spielt heute Abend gegen Frankreich.
Germany is playing against France tonight.

The preposition 'gegen' (against) always requires the accusative. No matter which meaning it is used in, the following noun or pronoun must be in the accusative.
Viele Menschen sind gegen den neuen Plan der Regierung.
Many people are against the government's new plan.
You can recognize the meaning of 'gegen' (against / around) from context. In sports or conflicts, it is about opposition (m01), with numbers it indicates an estimate (m03), and with verbs like 'tauschen' (to exchange) it indicates an exchange (m04).
Ich nehme ein Medikament gegen meine Kopfschmerzen.
I'm taking medicine for my headache.
In the meaning of 'Widerstand' (resistance), 'gegen' (against) is often used in fixed combinations: to be for or against something, to violate the law, a remedy for an illness, or protests against a decision.
Bist du für oder gegen den Vorschlag?
Are you for or against the proposal?
When 'gegen' (against / into) describes movement, it often implies unintended or forceful contact. Typical verbs for this are 'fahren' (to drive/ride), 'laufen' (to walk/run), 'stoßen' (to bump), or 'prallen' (to crash/bounce).
Pass auf, dass du nicht gegen die Glastür läufst!
Watch out that you don't walk into the glass door!
When 'gegen' (compared with) expresses a comparison, the phrase often comes at the beginning of the sentence, followed by a noun in the accusative and then the main clause.
Gegen seine Erfahrung bin ich ein Anfänger.
Compared with his experience, I'm a beginner.
to / too / closed
'zu' and 'gegen' can both occur with time expressions, but they do not mean the same thing. 'zu' often names an occasion or a typical time, for example a holiday or a meal. 'gegen' gives an approximate time or quantity. Learners may confuse the words because both feel time-related. If you mean 'around this time', use 'gegen'. If you mean 'on this occasion' or 'with this meal', 'zu' fits.

Der Zug kommt gegen acht Uhr an.
The train arrives around eight o'clock.
Zu Weihnachten besuchen wir meine Eltern.
At Christmas, we visit my parents.