How to really make it only "one object"
This generally is not the "correct" or desirable way to model this.

Joining geometry with Ctrl + J will only group and turn it into one object, it will not alter you geometry in any way, nor will it "merge" volumes or faces. That is the job of a Boolean operation.

You can generally undo this step as described by Samir-Rahamtalla with P > Loose parts since the geometry will be exactly the same, and return to your "non merged" objects without loosing too much information, object centers will be lost though.

Boolean operations might work under certain circumstances, if you objects are closed watertight manifold meshes, and they don't have coplanar or coinciding faces.

In your case it will most likely fail since your faces are co-planar, and even if it does work, it will likely produce undesirable, uneven triangulated geometry, which in most cases will cause more problems down the road.

The "correct" way to mode something like this is to do it in edit mode by subdividing and extruding your mesh, so it will produce a "clean" geometry.