In modern English, "ward" usually means a hospital division or a political district. In Shakespeare, it most often means a guard, watchman, or sentinel assigned to protect a person or place.
There I may watch afar some secret Ward
Within thy sacred temple of the brain.
Here, the speaker imagines a hidden guard ("Ward") stationed inside the beloved's mind ("temple of the brain"), watching over thoughts or secrets. It conveys surveillance, protection, and the mind as a fortified space.
Context determines whether it means a person (guard), an action (guarding), or a defensive posture. It never means "hospital wing" in Early Modern English.