You'll struggle to pull it off under $500, even if that is just the budget for equipment. Then add budget for hardscape, plants, livestock. If you don't already have a system, don't forget maintenance equipment - buckets/siphon tube or Python system, a net, dechlorinator, food, power strips (with switches is more expensive, but makes maintenance so much easier), that sort of thing. Plan to take things slow to avoid buying test kits, and hope your fish don't get sick to avoid buying meds.
Try to buy tank/stand/lid used or it will eat up a huge chunk of your budget. You may be best off buying a complete planted system used if possible to stay in budget.
You'll need a light. Think chinese LED fixtures. You can get a Beamswork DA Fspec (48" long) for about $65. Add another $13 for a timer/dimmer/controller (I like the S2-Pro you can buy on Aliexpress).
For substrate, look for the big cheap bags of sand/clay (Black diamond blasting sand, pool sand, Safe-T-Sorb).
Looking at my cost spreadsheet, I managed to spend about $500 on my 20G budget tank (including hardscape, plants, livestock). And that was with a dollar-per-gallon tank and no stand because it was going on a sturdy desk, probably about $80 of stuff I either didn't need or could have accomplished cheaper, and a bunch of stuff I did need on very good sales, plus cheap plants bought at my local club. I did DIY yeast CO2 (used this for over a year, at a total cost of around $15 over the whole time period). I was careful about power usage too, and probably spend about $90/year in power costs, plus $20/year in food, replacement filter sponges, and dechlorinator.
That's not counting the impulse aquarium buys (online plants, a used paintball CO2 system to replace my DIY system, unneeded shrimp food but it's so fun to feed them, etc) over the last 18 months that have probably added another $250 to my total.
I recommend doing a spreadsheet of expected costs for your setup if you buy the parts new. Look at hardscape/plant/livestock costs at your LFS (or local club, if you are so lucky) and factor those in. I remember power being dirt cheap in Oregon, but calculate your expected power use too.