Sri Lanka's economic crisis is a product of Chinese foreign policy, specifically its practice of "debt-trap diplomacy." China doesn't provide funds and build infrastructure in developing nations to help them become more viable. Rather, they are trapping vulnerable countries in unsustainable amounts of debt, knowing that they'll fail their financial obligations, allowing China to control them and acquire private and public assets.
While Western observers have lauded India's help to Sri Lanka, they've criticized China for providing the same loans and economic assistance. The so-called "debt trap diplomacy" is a narrative that the West has used to defame and smear China. China has worked with Sri Lanka to help meet its financing needs and improve its ability for sustainable development. Loans and aid to Sri Lanka shouldn't be treated differently based on which country they come from.