Funny. I'm still on a OnePlus 6 and I see similar bizarre freezes as OP when I open the photo gallery. Or just when starting the camera often I have to wait 15-20s before the phone realizes that I have pictures. Sometimes when swiping through the gallery it will become excessively slow and stop reacting to panning / swiping / zooming.
It's what is driving me close to grabbing a new phone at some point this year.