If the wood isn’t bare, untreated wood, repair any cracks or holes with wood filler and sand the whole surface with different sandpaper grades ranging from medium to fine before applying the fresh paint.
If you’re painting raw, untreated wood, the answer is: no, you cannot paint directly on the wood.