I believe there are moral arguments against prostitution (I Corinthians 6:15-16 comes to mind) which don't directly address the possible production of bastard children.
We have managed to limit the immediate harm. There used to be nightmare stories of children of prostitution who were loathed and hated and quite often inspired into a life of crime if not also exploitation.
I think the influx of illegal aliens/human trafficking has (unfortunately) filled up this void.
Talking about at the level of “world.”
Not some synthetic semi-Christian thing.