The causes of the current economic crisis in Sri Lanka have more to do with other bad decisions by their government, including:
The government made a slew of policy decisions which resulted in macroeconomic imbalances on all fronts and this exacerbated the economic crisis, says Dr. W.A Wijewardena, former deputy governor of the Central Bank of Sri Lanka. These mistakes range from the tax cuts to poorly thought out borrowing to selling forex reserves to prop up the exchange rate with the dollar to an overly ambitious shift to organic farming which caused a significant drop in agricultural output.
Although the Chinese reluctance to discuss debt restructuring with Sri Lanka may have added to the current problems (they apparently asked in January, but have yet to hear back, according to The Economist) only 10% of Sri Lanka's debt is officially owed to China directly, at least according to official figures.

Similar analysis here
Most of this debt took the form of international sovereign bonds (ISBs). But this quick and dirty solution came at a price: higher interest rates, shorter maturity periods, and greater risk. By 2019, commercial borrowing, which was a mere 2.5 percent of foreign debt in 2004, had ballooned to 56 percent.
In comparison, Chinese-owned debt (including public debt and publicly guaranteed debt) represented only 17.2 percent of foreign debt in 2019. But the real devil lies in the effective interest rates of the ISBs, which are more than double those of Chinese loans. Sri Lanka’s interest payments alone took up 95.4 percent of government revenue in 2021. For comparison, its credit-rating peers Ethiopia and Laos have rates of 11.8 percent and 6.6 percent, respectively.
While Sri Lanka’s higher development status should have resulted in more direct taxation and the growth of the tax-to-GDP ratio, its tax system is highly inequitable, with indirect taxation accounting for an estimated 80–82 percent of revenue. The falling tax-to-GDP ratio is due in part to the failure to expand the tax base, reliance on indirect taxation, tax policy instability, and an excess of tax concessions and relief.
Import duties are Sri Lanka’s preferred form of revenue collection—more than half of government revenue is raised this way. Rich and poor are taxed equally on consumption of essential food imports, cooking fuel, and even sanitary pads. Heavy taxes on consumer goods have created a regressive tax system that struggles to collect sufficient revenue to finance public spending. In contrast, progressive taxation has failed to grow since the 1990s, with the number of individual taxpayers not keeping up with economic expansion.
The irony here is that as the Sri Lankan government limited imports in order to stem the outflow of foreign reserves, due to the tax structure that also significantly cut their tax revenue. This on top of the pandemic-related loss of tourism income.
It's also true that China was the major lender to Sri Lanka in 2020, but that's because ISB money had dried out, after their credit rating was cut in late 2019 (as a result of their tax cuts), so they could no longer roll over ISBs. And the Chinese didn't lend them enough money to fully cover this shortfall, so Sri Lanka's forex reserves rapidly diminished as they were used to cover the difference.