Unfortunately if you closed Notepad and clicked "Don't Save," your unsaved content is usually lost permanently, but you can check a few temporary locations just in case.
Windows sometimes keeps temporary copies of app data while running. Press Windows Key + R to open the Run box, type %temp%, and press Enter. Look for files ending in .tmp or files modified around the exact time you lost your text. Right-click any likely files and open them with Notepad to see whether your text is there.
You can also check the AppData Packages folder used by Windows 11 Notepad for session state files. Press Windows Key + R, type %appdata%, and press Enter. Go up one level to the AppData folder, then open Local, Packages, and Microsoft.WindowsNotepad_8wekyb3d8bbwe. Check the LocalState and TempState folders for any temporary text files or files modified around the time you lost the content.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin