My take on it is pretty similar to what @
Valkynaz said: "edge" is when the darkness of the content doesn't serve the narrative in any way. On a superficial level, "grimdark" and "edgy" are virtually indistinguishable, but from my point of view, the difference appears when the respective elements are subject to scrutiny. As an example, let's say that a character who has been portrayed as harmless, innocent, or ultimately not involved with the greater conflict in the story dies a brutal, explicitly detailed death. It could be seen as grimdark if other elements of the story are affected by this event--the protagonist(s) suddenly realize how high the stakes are, or come to fear the individual that carried out the killing, resulting in plot developments that involve the affected parties having to work through the aftermath of the event. Or, it could show the villain having a complex about (or affinity for) their own brutality. As long as it results in some sort of greater plot development, it's grimdark.
If it's something that gets a token mention, and is subsequently forgotten about, or is used purely as a starting point for a plot that didn't actually
require that
specific event to begin, then it's edgy. Yes, some could argue that its "purpose" is to increase audience investment by giving them something to hate the antagonist for, or to buy into the mentality of the protagonist(s), but that kind of investment shouldn't have to come at the end of a scene inserted purely for shock value--that's manufactured investment, which quickly fades, and leads to more shock value moments in order to keep artificially building that investment, with diminishing returns. It's like the difference between playing a horror game that genuinely unnerves you, versus one that just constantly bombards you with jump scares: you
think you're scared either way, but in reality, the
former is what scares you, while the latter gradually grows to become irritating, and is a little less scary each time it happens.
Of course, this is all from my own point of view, so take it with a grain of salt.