I started to think I might have done something foolish.

Literal

Foolish [attr-な] act [obj-を] did [maybe-かもしれない] [quotative-と] think-[begin-始めた].

A reflective realization. 愚かな ('foolish, stupid') is a literary/formal adjective for poor judgment. 行為 ('act, deed, behavior') is a Sino-Japanese noun for a specific action. ~たかもしれない ('might have done') is the past-tense hedging 'possibility' construction. 思い始めた is a compound verb: 思う ('to think') + 始める ('to begin'), meaning 'to begin thinking.' Compound verbs with 始める, 出す, 続ける, and 終わる are extremely productive. Narrative introspection.