A number of things can cause an app to lock up. Nothing to do but troubleshoot.
Check for sufficient space. First, check to see that your internal drive is not running out of space.
Safe Mode. If all O.K. there, you could try booting up in Safe Mode and, after everything loads, immediately shut down and reboot in normal mode. Then see if iMovie works properly. This link has instructions:
Start up your Mac in safe mode - Apple Support
Deleting Preferences. If still no luck, try deleting/resetting preferences. Open iMovie while holding down the Option and Command keys and select to delete preferences in the box that appears. iMovie will open in a new library. Reopen your old library to get back to your projects. Possibly you may need to reboot to set the changes. Deleting preferences is a safe procedure that will not cause data loss or disruption to your project.
Open in New Library. Another thing to try is to open iMovie in a new library. To do that, open iMovie while holding down the Option key and then selecting to create a new library in the box that appears.
Redownload iMovie. Redownload iMovie by dragging your current iMovie app from the Applications folder into the trash, but do not empty the trash. Then sign in at the app store and go to your account by clicking on your name at the bottom of the sidebar on the left. That will display the icons of your purchases. iMovie will be one of them. You can redownload from there.
Reset the System Management Controller. All else failing, try resetting the System Management Controller (but no longer available for the new M1 and M2 computers):
Reset the SMC of your Mac - Apple Support
As a last resort, contact Apple support. The techs there have the capability of remotely accessing your computer that we cannot do here. To contact apple support click on the Support item above this forum’s screen. Navigate
to a place where you can enter your phone number.
-- Rich