Do guys do stupid things in relationships?

My boyfriend currently did something that hurt my trust a bit and he said he understands it’ll take time to build it back and apologized.

Although I am still confused. Do guys really do just so stupid stuff in relationship sometimes? Before this it was going really well and now this has set us back some