What helped me a lot and is rather simple to do is create a weekly allowance for yourself.
Take the bill money out and send the bills out so they're set. Then put an amount aside for savings/emergency funding, so that things like the router are covered in the future.
With the money leftover, I split it up into the four weeks of the month. (or you can do this twice a month if you're paid every 2 weeks). Put the four weeks into envelopes, and each week take out the envelope and spend that set amount :3 if you're gonna run out all the time anyways, better that you run out of budgeted money than all the money.
Given the 500$ amount after bills are paid. I'd put 100$ aside for emergencies, and allow myself 100$ a week. That's plenty of spending money imo.
At the end of the year, if only a few emergencies came up, you can take that money and make a big purchase on something you thought you wouldn't be able to get. Or, you can continue to save it, invest it, etc.
Usually when it comes to my spending money, if I didn't spend all 100$ that week, I'd put the rest of what I didn't spend into seperate savings, and just give myself another 100$ as usual. That seperate savings turned into things like trips to the beach, impromptu nights out with friends, or you can use it for unexpected items that came up like the router without tapping into your emergency funding.
It's a pretty loose system, with fairly easy rules, so people who are bad at budgeting can even follow it pretty well.
Also, the food thing is huge. You can loosen up a lot of your tied-up money with food planning. I spend every Sunday planning out what I'm making for the entire week so I only buy those groceries and don't need second trips at all.