I believe that DB» only runs something like 60% of German rail services.
DB AG runs (practically)[1] all the Fernzüge, that is the long distance (e.g., Munich - Berlin) trains which cross the borders between the Länder, being the ICE and
IC▸ trains. These are sponsored by the Federal Government although the Fernzüge are just profitable.
The trains which run solely within the Länder (or just over the border to the neighbouring Land) are sponsored and paid for by the Land. These run competitions for a package of routes and number of trains over a five or seven year period. Although DB Regio has won some competitions in many cases these routes are run by private operators.
Much freight is still operated by DB Cargo but there are many, in the order of fifty or so, private freight operators. These often concentrate on certain flows for one or a small group of customers and some run long distance freights from, for example, the Alps to Hamburg or Rotterdam.
[1] There are only two or four train-pairs at the moment run by a subsidiary of Flixbus (the long distance coach operator) although
IIRC▸ Leo, a Czech operator, is also looking to get into the market. See <https://www.leoexpress.com/de>