I question the conclusion drawn here on why US still using C130. It is no longer hitting the sweet spot as the size and weight of the typical cargo has changed comparing when C130 was the sweet spot. US is still using it because the supplier got them.
According to Wikipedia, Lockheed Martin has been consistently delivering about 25 new units per year over the past 10 years. New ones are still being regularly delivered to the U.S. military. The U.S. Navy is considering placing additional orders. A whole bunch of countries have already placed new orders since 2020, including Australia, Sweden, the Philippines, Egypt, New Zealand, etc.
Countries are using them because they need them, not because they're stuck with old aircraft. The Y-8/Y-9 is basically the same size as a C130. Clearly, the PLA sees the importance of having an airlifter of this size as well.