Part of the reason why the existing social orders can be seen as the antagonist in both stories is because the role of women is rigidly defined, one that the protagonists seek to change. In "The Yellow Wallpaper," the protagonist tries to break through the social dictates which demand that she remain insulated in bed and not do anything. This is why she tries to draw/ write, and then envision consciousness through the wallpaper designs. She is trying her best to break through what is told to her from a social design. Social conceptions of women are what really provides the cage for her. This is similar to Mrs. Mallard in Chopin's work. When told her husband has died, she is forced to be sad and in mourning as per social expectation. However, this does not allow her true essence to be revealed, the identity which permits her to embrace freedom and a newly discovered sense of autonomy with her husband's death. Here again, a social order dictates what the woman can do as opposed to allowing her to do what she wishes to do.
In the two stories you ask about, "The Story of an Hour" and "The Yellow Wallpaper," society is the source of stereotypes, mores, and gender roles. The protagonists in both of these stories live in patriarchal societies. As women, they are supposed to fit feminine stereotypes, act in certain ways, value certain things, and play specific roles. When a woman does not fit the stereotypes, believe in the same mores, and perform the "correct" roles, she is outcast, possibly in a literal sense (as in "The Yellow Wallpaper"), but certainly at least in a figurative sense (as in "The Story of an Hour").
These thinking, feeling, expressive women are doomed, doomed by the societies in which they live. In this sense, society is an antagonist in both stories.
In both of the stories “The Story of An Hour” and “The Yellow Wallpaper” the women have been stifled by the social expectations of women of their social stature. The women are not expected to be anything more than dainty beautiful sickly creatures to be contained and cared for by their husbands. They have been conditioned to be sick an as a result have succumbed to the expectations of those around them.
The females are bored and trapped. Society has left them no outlet for physical or mental expression, but has repressed them both physically and emotionally. If their male doctors and their male husbands say things are a certain way, then they must be that way. As a result, one woman loses her life and the other woman loses her sanity.