Git itself is neither centralized nor decentralized by design, it merely provides an infrastructure for replication and is agnostic about whether or not there is a "center" to the space of replicas. It depends on how you use it... but in practice the way it is used in nearly all projects is that there is one "main" (authoritative) upstream repo for a project, and that creates a point of centralization unless you put that repo on IPFS.
Yes, you could also completely forgo having a "main" repo, but how are the users then to find the "latest version" of your project? Who are you going to fork from, how do you discover collaborators? Git does not provide mechanisms for solving these problems; they're outside its scope. But some of the P2P and federated technologies such as IPFS do. With IPFS you can have a main upstream repo that's advertised without there being a host / person / org that can be hit with a takedown request. And other federated projects mentioned in this thread address other questions around collaboration that Github (as well as Gitea and Gitlab) address in a centralized fashion.