Good job ditching the sand.
Oh, man...the $40 budget is a bit of a Sophie’s Choice because UV and heat are both so essential. But because a basking bulb doesn’t have to be a pricey model sold at a pet store (in many cases the flood bulbs that have worked well for many members were purchased for $5 at Home Depot and they’re very bright and heat efficient), you should focus your very limited budget on ensuring the cage temps are safe and get a temp gun (here’s an example:
https://m.drsfostersmith.com/product/prod_display.cfm?pcatid=24294). If you get both these items they’ll ship them for free. But you’ll still need a fixture for the UV light, unfortunately. Ideally this would be a Sunblaster or another fixture with a built in reflector, but since we’re toward the top of your budget already, you can get by with an $8 fixture from Walmart for now if push comes to shove. If you click on the lighting guide on this website, you’ll see a tank setup that uses one of these.
So those three items would be my vital picks. If the cage is very small (and I’m still not sure what size it is) it will be extremely difficult to have a gradient (a hot side and a cool side). You generally want a UV tube to stretch across at least half the tank, but it’s good to have an area where the beardie can avoid the UV light when he’s so inclined (which is also why it’s good to provide hides/caves so he can seek shelter or security when he wants privacy). The cool side should be between 75 - 85 degrees F, and it’s very difficult to have a hot and a cool side if the tank is tiny. If the tank size doesn’t allow this, do you think you might be able to return it and spring for something larger? You can even check Craig’s List (you might find a really good deal on a big tank).
I guess in summary, with $40, I’d go for:
1. Temp gun or digital thermometer. If the basking temps are too cold he won’t be able to metabolize his food, and if they’re way too hot it can be lethal. We need to ensure he has a basking spot between 100-110 degrees. Cost: $15-20.
2. UV light. Vital for growth, preventing metabolic bone disease, and psychological wellbeing. Reptisun T5 10.0 or Arcadia D3 + 12% are the best tubes money can buy, and most would argue they’re the most important purchase you’ll make for a beardie. $15-25 at the lowest price (see the Drsfosterandsmith.com link or you might be able to score a deal on Amazon). These are overpriced by about $20-25 at most chain pet stores, so your best bet is buying online).
3. A fixture for the light. It sounds like the budget will only allow for a Walmart fixture, but consider a Sunblaster or a specialty fixture with a reflector in the future, particularly if your adult tank (and adults need a very big tank. Forty gallons is the bare minimum but a 75 gallon or larger is much more ideal) is very tall.
So I know this may go beyond your $40 cap but it’s close enough that perhaps someone could float you $5 or $10 to make it work. And again, a 45watt flood bulb generally isn’t too pricey and will last a really long time. There are other options (just be sure to avoid colored or tinted bulbs). Unfortunately there’s just no way around the fact that the initial investment in a beardie’s setup can be quite pricey. But I’ve included the links to some of the lowest prices I’ve found for these items, so hopefully that helps.