Are you sure the drive letter the photos were on hasn't just changed in Windows because you never assigned a permanent drive letter so Windows moves it around based on what else is plugged in? That is the normal reason photos go missing, and you just need to assign a drive letter permanently.
In any case you shouldn't be re-importing the photos, you should just be telling LR where the photos are, now. In LR, you should be able to right-click on the top-level folder(s) (on drive M in your example) and choose Find Missing Folder... and then point it to the correct location (on the N drive in your example) and LR should "move" things back within itself, for anything under the folder you chose.
I have an example of missing folders because I have disconnected an external drive, so they'll show up when I plug the drive back into my computer and I don't need to go through the procedure I just described, but it lets me show you what the menu item looks like:
Lr may have many faults and errors, but changing the drive letters is a Windows "feature" not something that Lr can manage or influence. Please see here for more information on how to fix this problem.
This, however, makes Lr apparently missing the photos, as Lr is not aware of the Windows drive letter changes. The data is still there, but you need to reestablish the connection. That is done as by ssprengel 's and these instructions: How to create and manage folders in Photoshop Lightroom Classic CC - Locate missing folders .