This is definitely not a stupid question!
Many indoor rabbits enjoy some outdoors time when the weather permits. I have a run for my rabbit, where he can dig and eat grass and get daylight on him. He seems to appreciate this very much.
My rabbit is vaccinated against the dreaded RVHD virus which sadly has come to several places in the USA now. The vaccine is not currently available everywhere. If you are in the USA, I’d try to look int the RVHD situation in your area. We have a pinned thread about this illness https://binkybunny.com/forums/topic/please-read-rabbit-hemorrhagic-disease-rhdv2-outbreak-in-north-america/
There are other dangers than dirt to be aware of if you let your bun out in your garden. The garden must be very escape-proof. Predators like foxes and feral cats and also birds of prey are threats to a bun in a garden.
If there are raccons in your garden, they can carry some nasty parasites that rabbits can pick up.
All in all, indoors life is safer for a rabbit. Outdoors time can significantly increase quality of life for some buns though. Some buns will find the outdoors scary and uncomfortable.