First, you need to put your camera at the same hierarchy level than your cube, not as a child of. Later, you have to move your camera in the same direction as the cube while it’s looking at it. I post you a simple code below…
void followCube(){
myCameraTransform.LookAt (myCubeTransform.position);
myCameraTransform.position += myCameraTransform.DIRECTION * speed * Time.deltaTime;
/**
* DIRECTION = could be forward, up or right and his negatives values
* speed = mouvement speed
*/
}
You have to call this method in the Update function and attach the Script to the cube. I hope this help you. Regards.