Use caulk, specifically you will need an acrylic latex siliconized caulk. Do not use plain silicone caulk because it is not paintable. Do not use plain latex caulk because it is not flexible enough. Acrylic latex siliconized caulk is available at hardware stores and home improvement stores.
Use a thin nail to poke a hole in the end of the caulking tube. Do not cut the end off because too much caulk will come out of the tube.
Slowly squeeze the caulk into the crack or chip on the wood trim.
Use a wet, clean cloth to wipe the surface to remove any excess caulk.
Allow the caulk to dry thoroughly. The caulk will shrink a little. Apply a second round of caulk and wipe the surface with a wet, clean cloth. Allow the caulk to dry completely and then paint.