How do I fix the edges that runs around my cube from becoming really long when scaling on an axis?
If you want to stretch the cube without deforming the edges, you need to modify the mesh itself in Edit mode, because if you stretch it in Object mode will also change the edges width, so switch to Edit mode, press AltZ to have transparency, select the vertices of one side, and move them along the axis you want: