Of course many accidents have a "pilot error" component, the central issue is what made the pilots do the wrong thing. This needs to be analyzed on a systemic level, i.e. was the training good enough, did the pilots receive adequate information, did the aircraft system provide the pilots understandable feedback, etc.
For the pilots to do the right thing, they first need to identify the problem. That can be very difficult when a lot of visual and auditory alarms -- sometimes contradicting each other -- goes off at the same time. The aircraft manufacturer has to account for the human factors.
Boeing failed miserably in this regard: 1) MCAS didn't work as intended, 2) they deliberately left out essential info about the system from flight manuals. In addition the FAA failed in their oversight of Boeing.
The deaths are on them, not the pilots.