dienen als
to serve as
To fulfill a particular purpose or function as something specific.
Dieser Raum dient uns als provisorisches Büro.
This room serves us as a temporary office.

to serve
Loading your saved state.
to serve as
To fulfill a particular purpose or function as something specific.
Dieser Raum dient uns als provisorisches Büro.
This room serves us as a temporary office.

The verb 'dienen' (to serve) is always used with the dative. The person or thing that one serves, or for which something is useful, is in the dative.
Der Hund dient seinem Herrn als treuer Begleiter.
The dog serves his master as a loyal companion.
The verb 'dienen' (to serve) is the root of many other words related to service or duty. Examples are 'der Dienst' (service/duty), 'der Diener' (servant), or 'die Bedienung' (service/waiter/waitress).
Der Kundendienst war sehr hilfreich.
Customer service was very helpful.
When 'dienen' (to serve) has the meaning 'to function as', it is always followed by the preposition 'als' with a noun in the nominative. The structure is: subject + dienen + (dative) + als + noun.
Die alte Kiste dient mir als Tisch.
The old crate serves me as a table.
In the meaning 'to be useful', 'dienen' (to serve) is often combined with abstract nouns in the dative. Typical phrases are 'einem Zweck dienen' (to serve a purpose), 'der Sicherheit dienen' (to serve safety), or 'als Vorbild dienen' (to serve as a role model).
Regelmäßiger Sport dient der Gesundheit.
Regular exercise benefits health.
In a military context, 'dienen' (to serve) is often used with prepositions like 'bei' or 'in' to describe the place or unit. You can also add 'als' to name the role.
Er hat drei Jahre bei der Luftwaffe gedient.
He served in the air force for three years.
to work
'arbeiten' and 'dienen' can both have to do with someone doing something for others. 'arbeiten' is very general and neutral: you have a job or carry out a task. 'dienen' means either that you help and obey someone in a subordinate role, or that something is useful. For that reason, 'dienen' often sounds more formal or more specific than 'arbeiten'. If you are simply talking about a job or an activity, 'arbeiten' is natural. If the purpose, benefit, or helping someone is important, 'dienen' can fit.

Diese Notizen dienen mir als Hilfe für die Prüfung.
These notes serve as a help for me for the exam.
Meine Schwester arbeitet seit zwei Jahren in einer Bäckerei.
My sister has been working in a bakery for two years.