How do you recover a presentation document when you accidently overwritten it with something else?

Hello
I was doing my homework and I finished and I pressed Ctrl+S and it saved by itself.
And I opened another document and accidently saved it as the same title and it asked me if I wanted to overwrite the homework(of course I didn’t know it was my homework!) so I clicked “Yes”. And after I finished everything, I looked for my homework and clicked on it but realised it wasn’t it. Also, I could go back because I already saved it as something else.

Please help me out! How to recover a file that is overwritten by accident?

To the best of my knowledge there is no way to recover an overwritten file. What you did sounds to me like:
Do you really want to hit your PC screen with this big hammer? And you answered YES…

I am sorry for the loss of your homework. As homework is a kind of an exercise for what you learned, doing the homework again is a good invested time because you will understand all better.

Do you have LibreOffice configured to save Back ups? See if the Save backups is ticked in Options>>Save/Load>>General

@swolf154 - Does the backup function you mention still keeps an old version of the overwritten file?
1