In college I used gnucash for this and even wrote a (now very old and somewhat embarrassing) article about it (https://organicdesign.nz/A_day_in_the_life_of_a_dollar).
After I got a bit tired of gnucash's relatively baroque interface I moved over to https://www.mvelopes.com, but I found it expensive, slow, and just not to my taste (it might be better now, this was still over a decade ago).
Next, I noticed this newfangled site called Mint.com. I liked it right away and even had a phone conversation with its founder about the envelope budgeting idea. He said he really liked it and would look into it but then of course Mint got acquired by Intuit and we all know what Intuit does to creative product ideas. I still use Mint to track net worth and cash flow but every time I open it I sigh at what could have been.
Some years ago I heard about Simple and was incredibly excited that an actual BANK finally grokked what was so obviously awesome about this idea. I signed up right away and for a few months enjoyed budgeting bliss. But I knew it was likely to end in corporate takeover sadness and so I avoided moving my accounts to it. This is a decision I regretted having to make, and regret being right about.
Some years ago I got the bug again and spoke to some startups who were trying to democratize the "connect to your bank API" space, which would let folks like me just make a tool ourselves and maybe productize it without having to look for VC funding just to afford the stupid license fees for bank connectivity. I had a few good conversations but no one else seemed anywhere near as excited about it as I was.
Fast forward to today: I work at a FAANG company doing interesting stuff and have pretty much abandoned my dream of doing finances this way. I've tried gnucash again. I've tried spreadsheets. I've tried custom personal programs. None of them are really good.
You REALLY want your bank to do this.
What you want is to tie this to your debit and credit cards and have them all pool from the same "virtual subaccounts".
What you want is to be able to have your credit card be declined if you go over budget (with an option to override).
What you want is to create a tree of accounts in under a second using your smartphone without having to fill out forms.
But you won't get it, it seems.
Product idea: A bank. With a a nice API. That's it. I'll take my startup idea equity now.