I used to brew cold brew that always tasted sour after a day. I found out I was letting it sit out too long. After a few bad batches, I learned that air was ruining it. Now, I put it in the fridge for 12 hours instead of leaving it out for 24. This keeps the flavor good for a whole week. Last batch I prepared was still great after five days. If your cold brew turns sour, try steeping it in the fridge.
Read an article that said exactly what @wade915 mentioned. The sour taste happens because air gets in and starts breaking down the coffee. It's not just about time, it's about keeping oxygen out. That's why the fridge method works so much better, it slows everything down. A tight lid is just as important as the cold temperature. My coffee got way better once I focused on keeping air away from it.