I have a mesh which has quad vertices but when I try to click to select the edges of the mesh, it stops where the red circles are. But as you can see around the edge of the mesh, the rest is selected. Shouldn't it be able to select the edges since its all quad faces, there are no Ngons or triangles.
Jachym Michal has the solution, but I thought I would just clarify the underlying cause a little more given your comment.
Topology is only concerned by how vertices are connected to each other. The two meshes below have exactly the same topology, and serve as a good visual illustration of why your edge loop selection was curtailed. As far as the topology is concerned, the cylinder is the cube. If you select the magenta edge loop, Blender doesn't know which way to continue at the pole, down cyan or along yellow.
Edge loops won't continue through poles, which are vertices that don't have four edges coming out of them. The most common of these are N poles (as here, with 3 edges), or E poles (with 5 edges), but you can have poles with any number of edges coming out of them theoretically.
I'll also throw in another potential solution, which could be more or less useful depending on your specific mesh: Use Bevel with Segments: 2 and Profile: 1.0 to add a loop of faces to either side of an edge you wish to make into a face loop.