I had this happen but luckily I still have a 2015 iMac with Monterey that still can open the Library.
If you don't have access such an older Mac, you can right click the iPhoto Library and select Show Package Contents.
Then CAREFULLY hold down the option key and drag the Masters folder (it might be called Originals in some versions of iPhoto) to your Desktop or some other folder. This will make a COPY of that folder if you hold down the option key here, instead of moving that folder out of the original iPhoto Library.
Then open Photos app on your Mac and Import the entire Masters folder (copy) [or Originals if it was named that] that you just created, on your Desktop or wherever you placed it..
This will import all the images from that iPhoto Library but it won't bring over albums or any customizing you had under iPhoto. But at least you will get to bring the image files over.