Where do you live, if I may ask?
Im in centrel europe, and they do ont grow here, though I can get some on a regular base (while it is actually niche fruit here)
With time some of the tunnels would extend out below the oceans to further increase the probability that humans could survive a blanket of large asteroids and comets with the side effect of negating the usefulness of nuclear weapons thus nuclear weapons could be dismantled and repurposed in mini-micro-mini-micro subterranean nuclear power stations interlinked into neighborhood meshes. Every neighborhood would have a few dozen coolant filled clay heat batteries that would bring every home, road and walkway to 65F (18C) with fresh filtered air from the surface and from air storage geothermal tunnels.
With time the equipment and automation would sufficiently advance to move faster and more efficient. One trillion dollars will not be enough to complete the jobs, but rather to make an optimized blueprint so that every country can repeat and improve upon the process until the entire surface of the planet could be used to produce food until such a time that it has to be produced under ground. Anyone passing by the Earth should be convinced that the entire civilization is agrarian and non-technical thus not a threat. If the tunnels are deep enough and the tunnels are shielded enough from space then fiber networks could share a backup GPS network to reduce dependency on low powered space transmitters.
I believe this would be much easier to accomplish than moving parts of our civilization to the moon and especially more practical and safer than Mars.
Next it's medical stuff, then personal training, etc.
I'd push hard on documenting and replicating our entire industrial supply chain.
I'd put 10 billion dollars into just trying to replicate all of the things we're sure of.
I'd fund replications 2:1 against original research.
I'd fund a Memex implementation, a capabilities based OS, and completely open source compute, including hardware. No blobs anywhere.
I'd push hard on right to repair. I'd push for DCMA reform or repeal.
I'd push for limited copyright back to a reasonable range.
If if was in cash, the money will go back into donations, charities, invest it in more startups ad the majority to fund for research.
25% to foundational longevity research.
25% for cultural preservation projects in Europe.
It's impossible to efficiently manage that much wealth in one brain. Distribute it!
I'd run an essay contest. Every year the best thousand ideas are selected by yours truly and get funded at $100 million each. Even then, it would take a decade to burn through one trillion. It's a tough job, but I accept.
Probably the easiest to grasp, and (in theory) the easiest yo do is "give it away". But even this is much harder to do, and more complicated than it seems.
For example injecting substantial cash into a local economy leads to inflated prices. For example revitalized neighborhoods (gentrification) leads to higher housing prices, driving out the local population.
Aid to Africa has shown that in many cases the aid was harmful - inhibiting the growth of local food production etc.
If you choose to make say a thousand billionaires, then expect a billion applications. Good luck deciding.
Even building infrastructure (like say solar farms or nuclear plants) would greatly impact other players in that space. And ending up with all that energy production in one set of hands would be dangerous.
Spending money well is really really hard. Much, much harder than we imagined. Expect every grifter, scammer, organised crime etc to gravitate to your orbit. Filtering value from scam becomes hard.
Bill Gates is working on eradicating some diseases via vaccines, which is both clearly achievable, and really difficult (because some areas are hard to work in.)
So, it's an interesting question. But equally interesting is that no simple answer is really useful.