You get to keep only enough to maintain a very modest lifestyle in a low-cost-of-living area, the rest of it has to go towards improving the world in some way.
Edit: Given the previous rules that you must maintain a very modest lifestyle in a low-cost-of-living area, would you rather choose to opt out and not have the money at all?
Build my own village with affordable rent and live in a mansion in the middle and be like a lord of my own little village. Maybe also build a good school there. Evict people if they do anti social behaviour. Then when someone has paid enough rent to pay off the mortgage, surprise them by just giving them the house, or maybe after a time offer them to buy it with a reduced price because of the rent paid. So someone could probably live there and raise a family until they can afford a house, then buy their own house back.
Also arrange loads of community events, get people out and involved. Just make a wholesome and affordable community for others to live in. Maybe get businesses to move in to offer jobs as well.
With 5 billion, you can provide housing for 5k to 50k people, you don’t even need to charge rent
Good point, actually. It’s more money than I realised