The immune system sustains a tricky balance between protecting us and killing us. Autoimmune disorders result from it working too hard, and attacking what it shouldn't. So we don't want to boost it or enhance it.
I totally geeked out on virology and immunology during the pandemic. That's where I got such information as this.
Another thing is, you describe acute physical distress resulting from eating a generous spoonful of mashed garlic. I'd wager your blood pressure spiked. It's hard to see how that can ever be good for you.
If you survive a blood pressure spike I suppose it means you are in general good health, but I stopped jumping into cold lakes after saunas for that very reason. At a pagan fest I used to go to we had a sauna by a lakeside. When I learned that cold plunge spiked your blood pressure I relegated myself getting steamy and sweaty and naked with my friends and leaving it at that.