If you haven't already done so, check your Applications folder to see if iMovie is still on your Mac. If not, then you will need to upgrade to at least Mojavi 10.14.6 in order to get current iMovie.
You would need to know the previous owner's Applie I.D. in order to obtain the highest iMovie version that your current operating system will run. Not sure it would be legal to use an I.D. other than your own. However, you can try this procedure and see if it works:
To update/redownload iMovie 10, drag your iMovie 10 app from the Applications folder into the trash, but do not empty the trash. (You can skip that step if you had iMovie 10 on your computer before, but deleted it.) Sign in to the app
store and open your purchases folder by clicking on your name at the bottom of the app store side bar. You will see your purchases displayed, including iMovie 10. Redownload/update iMovie from there. If not successful, drag your present
iMovie app out of the trash (if you moved it there) and return it to the Applications folder.
-- Rich