neben
next to
Indicates a position directly at the side of something (where?). Used with the dative.
Die Apotheke ist direkt neben der Post.
The pharmacy is right next to the post office.

next to / besides
Loading your saved state.
next to
Indicates a position directly at the side of something (where?). Used with the dative.
Die Apotheke ist direkt neben der Post.
The pharmacy is right next to the post office.

In its spatial meaning, 'neben' (next to) is a two-way preposition. The question 'Wo?' (where?) takes the dative, while the question 'Wohin?' (to where?) takes the accusative.
Dein Schlüssel liegt neben dem Buch. (Wo? -> Dativ)
Your key is lying next to the book. (Where? -> dative)
While the spatial meaning of 'neben' (next to) can take the dative or accusative, the figurative meanings 'zusätzlich zu' (in addition to) and 'im Vergleich zu' (compared to) always require the dative.
Neben dem Studium hat er keine Zeit für Hobbys.
Besides his studies, he has no time for hobbies.
In the meaning 'zusätzlich zu' (in addition to), 'neben' (besides) often introduces a secondary thought or additional information. It frequently appears at the beginning of a sentence, followed by the dative.
Neben Deutsch spricht sie auch fließend Spanisch und Englisch.
Besides German, she also speaks fluent Spanish and English.
The idiom 'neben der Spur sein' (to be out of it) is colloquial. It means that someone is unfocused, confused, or not in their normal form.
Ich habe schlecht geschlafen und bin heute total neben der Spur.
I slept badly and am totally out of it today.
When 'neben' (compared to) expresses a comparison, it places two things in relation to each other. It is often used to emphasize a strong contrast.
Neben seiner riesigen Villa sieht unser Haus winzig aus.
Compared to his huge villa, our house looks tiny.
at / on
'an' and 'neben' both describe nearness to something. 'an' is used when something is on or at a surface, edge, or boundary, often with contact. 'neben' means that something is directly at the side of something else. There does not have to be contact. Learners confuse the words because both describe a position nearby. In practical terms: a picture hangs 'an der Wand' (on the wall), but a chair stands 'neben dem Tisch' (next to the table).

Nach dem Gespräch stellt sie den Stuhl neben den Schreibtisch.
After the conversation, she puts the chair next to the desk.
Die Notiz hängt an der Tür des Büros.
The note is hanging on the office door.