The flaws in Marxism were all figured out in the 1920s. Here, let me explain:
If you have goods that are directly consumable like bread or cheese you can divide them up among people evenly. That works. What doesn't work and is essentially an NP hard problem without money is how goods that are used to make other goods are used. Let's take an example of a freight railroad. What do you ship on the railroad? Shoes, fuel, tiny sub-assemblies of combine harvesters? If you have a piece of construction equipment, what do you build with it? A school, a factory, a playground, a road? In a modern economy all this creates an astonishing amount of complexity that is intractable from a central planning point of view.
How does this work in a capitalist system? Simple : Prices. The price of everything determines what the railroad ships, what the construction equipment builds, etc. In a complex investment decision, such as where to build a factory and what to produce in it, the managers use estimations based on prices of the factors of production and how much they can get for the goods produced to determine whether to build a factory, and where to build it. Prices are a distributed highly multi-threaded information system that tells people what is scarce and what is plentiful from moment to moment and thus directs production.
Prices are somewhat distorted by bank credit money creation and the associated credit cycles, which is what causes the booms and busts in capitalism. That can be fixed, but that's a topic for another day.
The history of the Soviet Union is full of massive planning errors. They built many towns in the middle of Siberia that they abandoned once the Soviet Union fell because the production output was minimal, they cost an enormous amount to heat and deliver supplies to and nobody wanted to live there. They didn't know this until they knew the real prices for running these cities. No communist government, except for the psychopathic regieme of Pol Pot ever dared to completely get rid of money, and even he admitted it was his biggest mistake!
If you want to dig into the theory of the planning problem in capitalism, I'd recommend Mises "Economic Calculation in the Socialist Commonwealth"