How to determine if there is moisture / water damage along the floor trim, bottom of door frames and doors themselves is similar to drywall. You want to look for bubbling / pealing paint, yellow / brownish discoloration or small black spots (mold) along the specific surface. If you notice any of those indicators that is a sure sign there is water damage and restoration is necessary. I highly recommend to remove the necessary trim to check the drywall behind to access that water damage to the drywall or plaster. If you notice any of the above indicators the drywall or plaster should be removed, new installed along with new trim.
If the trim is showing minimal bubbling / pealing paint and slight discoloration the paint can be scraped, sanded or completely removed from the trim area showing the water damage. After the preparation is complete there are some wonderful interior paint products for trim, windows or doors in need of water damage restoration. One of the best primers on the market to block the discoloration and seal the surface is Zinisser BIN interior oil primer. Here is a link for that product:
After the priming of the trim is complete I highly recommend a paint product by Benjamin Moore called Advance. Here is a link for that product:
The key in the water damage restoration is to identify the extent of the water damage. If like the above picture, completely remove all of the damaged areas and replace with new. If the water damage is minimal it’s very important to prep the surface correctly and prime with the primer noted above or similar. Do not use a latex based primer as it will not provide the necessary stain blocking elements.