Homeowners insurance will not cover any pre existing damage to the home.
When you get homeowners insurance for the first time the homeowners insurance company will send someone out usually to inspect the home and look for any pre existing damage to the home.
Then the homeowners insurance company may or may not sell you the homeowners insurance policy.
The homeowners insurance agent or person who comes to your home will usually tell you if you need to do any repairs to the home before they will insure the home.
And you also need to maintain the home and keep up on the paint and other repairs to the home or the homeowners insurance coverage may be dropped.
So if you have pre existing damage to the home you need to repair that damage first and then get homeowners insurance on the home.