UPDATE: SOLVED!! I tested it with a copy of my master Photo library. In the new mac with Sonoma, Press Option-Command and double-click the Photos library, Photo application will open up. Click Repair. You will see "Repairing photos.." and when that completes, it will become "Updating photos...". When both are completed, all the photos will show up in the Photo under Sonoma. Originally I tried to Repair using my old mac as Sonoma in my new mac corrupted my library when it got stuck at 5% during updating. So looks like it's an OS compatible issue.
With my library being over 360GB, the Repair process took about 2-3 hours (at least not stuck at 5%, and it moves steadily). And the Updating part took mover 10 hours. So I spent over 12 hours for the entire "Repair and Update" process. It's ok to leave it run overnight. And I did this successfully for 2 times, on my test Photo lib and my master Photo lib. Now when I run Photo in Sonoma, my library opens up with no problem.
Maybe Apple should pay us (by hours) for troubleshooting their problem.