BoundBox problems or doubts

I’m trying to make a boundbox for a model tacking the ends of the coordinates x, y and z of the original model. But when I apply transformations such as scale and translate the world coordinates of the object change but the bound box remains the same, how do I apply these transformations in boundbox too?? Could someone give me an idea how to make a boundbox 3D coordinates?

Thanks

Look at the implementation of bounding boxes in existing engines. They store the transforms so that when the model is changed, when a transformation is applied on a model, its bounding box is updated too.