das Oberteil
top
A piece of clothing that covers the upper part of the body, such as a T-shirt, blouse, sweater, or top.
Zu der schwarzen Hose suche ich noch ein passendes Oberteil.
I'm still looking for a matching top to go with the black pants.

top / upper part
Loading your saved state.
top
A piece of clothing that covers the upper part of the body, such as a T-shirt, blouse, sweater, or top.
Zu der schwarzen Hose suche ich noch ein passendes Oberteil.
I'm still looking for a matching top to go with the black pants.

The word is simply composed of 'ober' (adjective for 'upper/above') and 'Teil' (part). So it literally refers to the upper part of something.
Das Oberteil des Kleides ist mit Perlen bestickt.
The upper part of the dress is embroidered with beads.
Context is crucial for understanding the meaning. If people are speaking generally about clothing, it means a T-shirt or sweater. If they are speaking about a specific object like a bikini or cabinet, it means the upper part of that object.
Ich brauche ein neues Oberteil für die Party heute Abend.
I need a new top for the party tonight.
When 'Oberteil' (upper part) is the upper part of a specific object, the relationship is often expressed with the genitive or the preposition 'von' (of/from).
Der Deckel ist das Oberteil der Box.
The lid is the upper part of the box.
In the context of clothing, 'Oberteil' (top) is a very general term. It is often used when looking for a matching garment for the upper body, e.g. 'ein passendes Oberteil zur Hose' (a matching top for the pants).
Sie probierte mehrere Oberteile an, aber keines passte zur Jeans.
She tried on several tops, but none matched the jeans.
shirt
'das Shirt' and 'das Oberteil' can both mean an item of clothing for the upper body. 'Oberteil' is the more general term: it includes, for example, a shirt, blouse, sweater, or top. 'Shirt' is more specific and usually means a light, simple top, often similar to a T-shirt. Learners may confuse the words because every shirt is an 'Oberteil'. But not every 'Oberteil' is a 'Shirt'. If you do not know the exact type or do not think it is important, 'Oberteil' fits. If you mean a T-shirt-like garment, 'Shirt' is more natural.

Für die Feier sucht Maria ein schönes Oberteil zu ihrer schwarzen Hose.
For the party, Maria is looking for a nice top to go with her black pants.
Nach dem Training wechselt Tom sein nasses Shirt.
After training, Tom changes out of his wet shirt.