Download the Bounding Box preset and drag the Bounding Box.ffx file to:
Documents → Adobe → After Effects 2023* → User Presets
* or your current version
Inside After Effects, navigate to the Effects & Presets window. You should be able to find the preset by searching "bounding box". If not, open the dropdown menu and select "Refresh List."
Within a composition, but with NO LAYERS selected, double click the Bounding Box preset. This will create a new shape layer.
Parent the newly created layer to the layer of your choice. The bounding box will automatically conform to the shape, size and position of that layer.
With the shape layer (bounding box) selected, navigate to the Effect Controls. Under the Bounding Box effect, you can customize the appearance of your newly created bounding box.