When you say, "I was being stupid," it describes a period of time in the past when you were acting stupid. The emphasis is on the ongoing action during that time period. When you say, "I had been stupid," it describes an action that ended at a specific time in the past.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.