As far as I'm aware, China has been giving loans to various countries in Africa and building infrastructure in exchange for money and maybe some stuff like recognizing Taiwan as part of China. But why do people say China is imperialist for doing this? Is there truth to it or is it another strain of radlibs eating state department propaganda?
Hegemony is a loaded term. Trying to influence other governments is just trying to influence other governments. China is a relatively powerful country, but the underlying logic behind its support of African economies isn't imperialist due to the structure of their state and economy (i.e., not being controlled by a capitalist oligarchy). It's more similar in nature to the relationship between Cuba or the DPRK and post-colonial African governments, but takes the form of large infrastructure projects because China is actually capable of funding them. And obviously it's not purely altruistic, because China's still a developing country and still needs allies to support it in the struggle against American imperialism, etc., but that doesn't make the relationship exploitative.
China doesn't impose particular economic policies on the African countries they deal with, frequently forgives debts and offers interest-free loans, doesn't invade or sanction African countries, etc. Basically, they aren't doing any of the things colonial and neocolonial powers have done to subjugate African nations. They're just making mutually beneficial deals that both undermine predatory imperialist international financing institutions and drive the development of both China and Africa.
Check out this interview with a Zambian socialist presidential candidate where he talks about China's relationship with Africa: https://m.youtube.com/watch?v=CYKEq0fCggI
To me, imperialism is when one government tries to increase its own power and influence, usually by getting control over countries (be it outright or with regards to certain policies).
Ok, but that's literally all governments. Not even just every state - every polity has a stake in strengthening itself. That doesn't seem like a very useful definition.
I didn't word it very well initially. Namely, I updated the comment to include that another part of it getting control of other countries.