It really depends. My mystery novel has parts, not chapters; it has four parts & they all have names, & that felt right.
If I wrote a chlidrens novel, I think I's give that a slightly more ordinary structure & probably would name the chapters, not sure why, but it feels more user friendly.
On the other hand, none of the short stories in my collection has a name; Ive just given the name of the saint who "inspired" the story and get on with it. I like making my stuff a bit harder work for adult readers.

Or at least the literary stuff.
Sara Paretsky, whose work I adore in every other respect, uses titles and it just feels wrong. It just feels so unnecessary, and I dont know why she does it; it doesnt work.
I like the Harry Potter chapter titles, because they manage to be tantalising without giving anything away.
And I really really love those old-fashioned chapter titles that are really a small summary of what follows:
Chapter 13, in which our heroine finally finds out the meaning of the prophecy on the parchment, falls down a well and therein makes a most surprising discoverie.