I've seen this happen a lot. 9 times out of 10, it's actually not about your specific job performance, but actually about setting expectations (which it turns out, IS part of your job)
Your boss doesn't know all the details, but they see the end result (a delay), so they jump in and critique everything in sight.
What they probably need is to be looped in throughout the project and made aware of major decisions that change the end result or whatever it is that they care about (timeline / impact of the work).
Here's a template I use for managing expectations upwards: https://www.notion.so/Manage-your-manager-26a26b82bd824f97bf...