At the core of the current problems are the demand and aupply shocks caused by Covid and lockdowns early on in the pandemic. You can think of it as the same thing that impacted toilet paper, just on a global scale across all industries. Tgen we had the mess of containers not being where they should be (again, due to covid lockdowns and shipping disruptions) which made a recovery from the lockdown induced disruptions difficult. On top of that we have the war in Ukraine, which cut of Ukraine and Russia from flobal trade. While it seems that everything is coming from Ukraine at the moment, it is true that some things do, especially food stuffs and automotive parts. That happened while global supply chains still coped with the effects of Covid disruptions.
What JIT did, again not as a root cause, was to make these disruptions being felt much faster due to lower inventory levels. Not that any JIT was in place between suppliers in China and customers in, e.g. Europe so. With that long trabsportation lead times JIT is just impossible.
Tge alternative so, having huge buffer stocks, would have helped neither. Simply because one component shortage can bring supply chains down. Holding ebough stock of everything to buffer those global issues would require so much inventory that nobody can afford it, or the resulting products. High inventory has its own challenges so, and not per se resilient.
In the puplic mind JIT is associated with zero inventory (JIT aims for the minimum inventory which is never zero in reality). The current issues are, in the publics view, easily explained by insufficient inventory (which they are not). So it is easy to combine those two and blame JIT for everything.