iMovie cannot access movies and photos that are in the cloud. However, you can download them from the cloud and then drag them into iMovie.
You might consider purchasing an external drive to store your Photos library. It would need to be formatted either Mac OS Extended (Journaled) or APFS.
You can also create a second Photos app library to store your current photos on your internal drive. When you designate it as the system photo library in the Photos app General preferences then iMovie can access its content from the Photos item in the iMovie media sidebar.
I keep my large system photos library on an external drive. However, every year I create an additional photos library on my internal drive titled Photo Library 2021, Photo Library 2022, etc. in which I keep additional copies of the photos and videos that I am currently using that year. I back up all libraries, in addition to keeping all photos and videos in a backed up Finder folder. I feel more comfortable not having all my photos and videos locked up into any app's system. Everybody has a method that suits their own preferences.
-- Rich