Ockham's Razor does not mean materialism is true. It simply states that in cases where there are competing claims, the simpler claim is more likely to be true.
In science and history, the more complex explanation has frequently been proven true.
Alfred North Whitehead summed up the dangers of relying heavily on Ockham's Razor as evidence for one argument over another. He said, "the aim of science is to seek the simplest explanation of complex facts. We are apt to fall into the error of thinking that the facts are simple because simplicity is the goal of our quest. The guiding motto in the life of every natural philosopher should be “Seek simplicity and distrust it.”