There are mortgage life insurance policies available that allow you to purchase life insurance to protect your home mortgage loan.
Upon your death, the proceeds are paid out to your beneficiary who may use the funds to pay off the remaining mortgage loan which would allow your family to remain in the home they shared with you.
You can buy a mortgage life insurance plan at any time, including after you have already started your mortgage.
Make sure to select a "term" (duration) of coverage that matches the duration of your mortgage loan - 10, 15, 20, 25 or 30 years.
Also, make sure to select an amount of life insurance that matches how much you currently owe on your home mortgage, so your family is adequately protected.