The insurance company doesn’t care if you rebuild, the lender will.
Your loan docs will spell out who gets the proceeds from the insurance settlement.
If your house is paid off, you get a check for the amount to rebuild. You can do anything you want with it. The insurance company can’t make you rebuild.