I am not so good at Minecraft but my son is and he is at home with a flu and playing Minecraft and got really sad because he lost his treasures. His inventory was full with Diamonds and so on and after a while all was gone. I Think he found some items in some other place and by doing this his really nice things got lost. Is there some way to get back in time?
However, assuming you are in the correct section of the forums and he is playing the Java edition, you can switch to creative mode and take whatever you think is missing from the creative menu.
Even if cheats are turned off they can be temporarily turned on by opening the game to LAN on the pause screen and choosing to allow cheats.
(You can open the game to LAN even if your computer isn't connected to a LAN.)
(If this question is about the Bedrock edition I think you can still switch to creative mode, though I'm not absolutely certain how you would get around having cheats disabled, but using cheats will stop you from gaining achievements on that world.)