Two perpendicular faces are highlighted as one (upon selection)
What you might be dealing with here is called an &quot;ngon&quot;.  It's a shape that has more than four vertices.
It looks like you made a face of all of these verts with one F command before the top edge was made, or something similar.  So blender has done its best to draw it in a way that makes sense, but that is one face, technically.
It also looks like you have a couple of rogue edges down at the bottom.
In this case it's an easy fix, just select this top edge:

And hit J which is the shortcut for Connect Vertex Path.  It creates edges or splits faces where needed.