Children live in all kinds of different families these days. Sometimes parents are married, sometimes not.
Some children live with only one of their parents or they live with a step-parent.
So let's be clear about who has parental responsibilities and rights. Of course you can look after a child without having parental responsibilities and rights. But if legal issues arise, you may find that you are not treated in the same way as someone who has. So if you don't have legal parental responsibilities for a child, maybe you should think about getting them. If you do have them, it's worth thinking about making arrangements for someone to be your child's guardian if you die.