I'd allow time for that wood to dry out, and then scrape off any soft wood.
Then, repair that wood with epoxy.
The above is a wood repair kit you can buy for about $15 at Lee Valley. However, you should be able to buy the components anywhere they sell epoxies.
The two bottles contain a liquid epoxy and hardener. You mix equal quantities of both to make an epoxy that will penetrate into your wood. It has about an hour working time.
Then, you mix equal quantities of the paste resin and hardener in the two tubs. You then use that to "rebuild" the missing wood. It dries to a tan colour similar to wood.
Ideally, you want to apply the paste epoxy to the wood when it's still damp with liquid epoxy so that the two epoxies will crosslink with each other for a stronger bond.
And, you can also mix the paste epoxy with the liquid epoxy (after mixing each up separately) to make a "mud" similar to joint compound that you can spread with a putty knife.
Then allow time to cure. Prime, paint.