That’s correct. You would claim that loss with the company that was covering you at the time that the loss occurred.
Typically, insurance companies do not like to start a new policy while there is an open claim because there is damage to the home. It would be a good idea to contact your new insurance company and let them know that there was a loss. When you start a new insurance policy, they will typically send an inspector to the property to take a look at the home. If they see that there is damage, they could cancel the new policy.