I am assuming that the context of this question is that OP has an M.2 NVMe SSD that previously had an OS installed, but the drive has failed, and now wants to know if they need to wipe the drive before disposing of it?
I have not been in that situation before, but if it happened to me, I would probably make some attempts at doing a drive wipe of some sort. However if the drive is truly dead this might not be feasible. What is feasible, however, is simply destroying the drive. Unlike a HDD, a M.2 SSD's components are pretty exposed, and in the past I have just taken a pair of pliers to the memory chips and broken and crushed them up on drives I was getting rid of. Its pretty easy to do especially if you have two pairs of pliers, and I really doubt anyone fishing through your trash would bother to try to recover data from it, if its even possible (likely not)