It is a multi-facet problem that requires correction on both sides of the equation that created that child to fix. The men are having unprotected sex with women they have no intention of marrying nor maintaining a long term relationship with. The women are having unprotected sex with men who were never father material, but yet still deciding to keep a child they are woefully incapable of raising well themselves. Both sides could avoid all of this stuff if precautions were used and the child was not brought into this world by parents who are incapable of raising them well, but too many of them refuse to consider the consequences of their non-thoughtful actions. They end up creating a child who is destined to suffer in life unless extraordinary intervention by others are made or the child becomes extraordinarily self-aware to avoid the pitfalls.
In order to fix the problem, maybe actual draconian measures will probably be needed, but those measures are untenable to people and so will not be enacted. (I.E. Birthing certificate that shows the people are prepared. Laws against having children out of wedlock unless the person demonstrates they are capable of raising the child well alone or have the family support to do it, etc.) That would step on people's freedom to choose, and so none of it will ever be considered. Unfortunately, information on the consequences and various religious doctrines are all we really have and that seems to not be enough to resolve the issue. So I think the best we can do is just make sure we personally choose mates wisely and raise our children well. Giving them an example of a solid family, teach them how to choose wisely, and hope that it passes on to our descendants when we are gone.
This is all my opinion, and I am no expert on this issue. I have thought about this issue for over 30 years though, so I have committed a lot of mental effort on trying to find a solution to this problem that plagues too many of my people. I see the benefits of religion for people who are incapable of navigating life's decisions without a playbook. So, maybe draconian measures in the direction of actual good family values may help; even though I personally do not believe in any religions.