How to customize Touch Bar on the Macbook Pro 13" when Mathematica is on
You have two options:

If the app supports it, you can go in View &gt; Customise Touch Bar (more info here provided by Apple)
You can install BetterTouchTool, which is very powerful, and has (among other things) the ability to fully customise the TouchBar per app, globally, add scripts or anything really (other alternatives here)