Like any great mulch, wood shavings help create a light-blocking layer that weeds can't grow through. They may also absorb nitrogen from the soil, further
However, nitrogen loss can affect young plants, so try this hack only on more established plants. As the shavings decompose, they'll eventually leave rich and healthy soil behind.
Some mulch, such as yew wood mulch, are too toxic and are best avoided. Shavings from treated or processed wood, like old railroad ties, are also too contaminated for garden use.
Black walnut also has natural toxins and can be a natural weed killer, but make sure you use it on the walkways or driveways rather than the garden beds or near living plants.