How to add a main shutoff breaker to sub panel
Some panels will allow you to backfeed a breaker. AIUI that requires a kit to bolt the backfed breaker in place. Not every panel permits this.

Honestly, the BEST approach (and simplest - you don't need to order a kit to bolt in the breaker and figure out if the panel is listed for that use) is to return the sub-panel and pick up a main breaker panel, 100, 125 or 200 A (more about spaces than "amp rating" - the main breaker will be serving as a switch, while the 50A overcurrent protection will be back at the feed end of the wire.) Sometime the economics are weird enough (high volume of main panels) that it may actually cost less than a smaller sub-panel that they don't move a lot of.

Remove the bonding screw so that the panel is properly wired as "a sub-panel with main breaker" which might also mean you need to add some ground bars to keep the isolated neutrals and the grounds separated.