Guardian and warden are twins separated by the English Channel. Both descend from Proto-Germanic *wardō ('watching, guarding'), but they entered English through different dialects of French and arrived looking like strangers.
The Frankish *wardōn ('to watch') was borrowed into Old French as garder ('to guard'). Standard French changed the Germanic w- to g- — the same shift visible in guarantee/warrant and guerre/war. Norman French, spoken in northern France and then in England after 1066, preserved the w-. So English received both: warden from the Normans, guardian from standard French.
The two words divided the labour. Warden took on institutional roles: prison warden, church warden, traffic warden. Guardian claimed the more personal and legal territory: guardian of a child, guardian angel, legal guardian.
The root *wardō connects to a wide family. Ward is a person under protection. A guard is one who watches. Regard is to look at again (re-garder). A garrison is a group of guards stationed together. Even wardrobe belongs: Old French warderobe was literally a 'guard-robe' — a room
The same Proto-Germanic root may connect to aware (from Old English gewær, 'watchful'). To be aware is to be on guard — the watcher's natural state.