foolishly
In a silly, unwise way that ignores what makes sense.
To do something foolishly means to act without good sense or careful thought, in a way that's unwise or reckless. When you act foolishly, you're making a choice that ignores obvious problems or consequences.
If you spend your entire allowance foolishly on candy the day you get it, you might regret it by Wednesday when your friends invite you to the movies. A character in a story who foolishly wanders into a dark forest alone, ignoring all warnings, is making a poor decision that readers can see will lead to trouble.
Acting foolishly is different from making an honest mistake. When you make a mistake, you tried your best but something went wrong. When you act foolishly, you're being careless or ignoring what you know is sensible. A student who foolishly skips studying for a big test isn't making a mistake; they're making a choice they'll likely regret.
Everyone acts foolishly sometimes. What matters is learning from those foolish choices. The truly foolish thing is making the same unwise decision over and over, never learning from what happened before.