If it's of any consolation, people have always loved their children and loved them just as much as we do now. They have been interested in them, wanted to protect them, cherish them, and while parenting styles may have changed it's a falsehood that loving your children is a modern invention.
In 783, Charlemagne lost his infant daughter. She had a name (Hildegard), a proper burial, and the inscription on her resting place reads “Dear little maiden, you leave no little grief, stabbing your father’s heart with a dagger.”
There is an inscription on a child's grave from Ancient Rome that reads:
Here I commend to you, Fronto and Flaccilla,
your daughter, my joy and my delight,
Let young Erotion not be terrified by the black shades
and the gaping mouth of the Tartarian dog.
She would have completed six cold winters,
had she only lived but six more days.
Let her play happily between her aged parents,
and chatter my name with her lisping voice.
Let the turf covering her bones be soft and not hard,
and do not weigh heavily on that girl, Mother Earth,
For she was not heavy on you
Graves and funerals were expensive, grave markers even moreso. Why would they pay that money for someone they didn't care about? Lots of cultures throughout history had specific mourning periods, even for children - Rome for example had mourning that started at one month for a very young child and then it increased based on age. Who would spend a month in mourning for someone inconsequential?
My aunt died in the early 70s, she was hit by a car on her way to school. Another aunt died a year later, she was only little and choked on something she was eating. My nana never fully got over either of them. When she was looking after us she was militant about us sitting down, supervised, and chewing properly when eating. When she sent us out to play she told us every single time to take care next to the roads. She didn't spend all day every day crying because that's just not possible, grief never fully goes away it just gets less raw, but those losses left a mark.
One of my other aunt lost a baby in the 80s to what we now call SIDS. She also never got over it and for every baby coming into the family she would tell the parents to follow the advice about feet to foot, not sleeping on the sofa, etc. She would ask if their cot mattress was new, if it fitted well. She kept his little grave, the grass on it was always cut, the stone was cleaned, he always had a new plant or a little trinket on his birthday. Again, she didn't spend every day crying but she didn't ever not love him.