It’s easier to calculate how much you want to save and save it upfront then the rest of the money can be spent.
Max out 401k - money never touched your bank account
Split direct deposit so a portion or multiple portions go to your investment account and/or savings account
The rest goes into checking account to pay for bills and lifestyle expenses.
Save the money up front and never let it touch the checking account!
You can start by giving yourself some buffer into your checking account and later dialing down those numbers in your direct deposit config.
It’s much easier to do it this way and not worry about every single expense line item. Just calculate how much you think you can save and never let that money touch your checking account. Evaluate every quarter and adjust the numbers at the front accordingly.