She is only days pregnant.
9 months is a very long time.
Fine for you and your DH to think of options but keep your cards close to you chest.
There are lots of legals and contingencies to consider.
No logistical actions are urgent right now. You have 8 1/2 months to decide what’s the best financial/logistical decision for this evolving situation.
Right now you have to make the best emotional decisions.
Ones that conserve and preserve your RS with your daughter and DGC for your life time and build her emotional resilience to become a strong and confident mother.
Choose your words and actions carefully - gently with compassion - they cannot be unheard or unfelt. She is in a very raw and vulnerable emotional state. Even though it was her theoretical wish to become pregnant again - any elation may evaporate at any point in the next 9 months and be replaced with deep regret and fear.
Your DD has been through multiple traumas. An unplanned pregnancy, then adapting to this whilst being abandoned by her BF and soon after a late miscarriage, giving birth, bereavement, grief and loss and then it appears a fixation on getting pregnant again but this not happening very quickly.
All when she is still only a teenager barely out of school.
If these traumas are not processed properly she is at significant risk of PND which lasts years - which will negatively impact the emotional security and development of her own child and prevent your DD getting back to any education, training, career, independence etc.
She could then have a whole host of long term issues to contend with - she may not cope and this might fall back on you and your DH as in reality the chances of her teenage BF shouldering it all are slim.
So I would do everything you can right now to invest emotionally in your DD. Ensure she feels loved and supported. That she addresses her traumas with professional help so that she can grow in confidence and resilience.
She then needs to be nurtured, supported and encouraged to learn so many life skills in a very short period of time - parenting, budgeting etc.
None of this can be achieved without your direction. She cannot know what she needs to know without input. She may not recover from her traumas without kindness, respect and trust at home and professional support. A punitive approach could well backfire - on you and your DH.
In an emotionally supported state she will be better placed to manage and enjoy motherhood and minimise the risk of further emotional complications. Once she is emotionally solid the practical stuff (moving out, resuming / planning a career etc) will be much easier for her.
Put the horse before the cart - her emotional recovery and resilience front and centre.
This approach will have pay-offs for you all in the longer term.