Hello ahmad18mujtaba,
First ensure that the Mac and iPhone are both using the latest macOS/iOS version that each will support.
This page can help with updating iOS if needed: Update your iPhone or iPad - Apple Support
This one can assist with updating macOS: Update macOS on Mac - Apple Support
Also try checking to see if other elements of iCloud are syncing well between the two devices, as that can help to see if there's a broader issue occurring. This could include things like the Contacts app, the Calendars app, etc.
Checking to see if the sync is still actively in progress can help as well. Launch the Photos app on the iPhone, and then in the bottom left choose Library. Tap on All Photos, then scroll to the bottom of the screen. For macOS this status can be found in the Photos app by launching the Library tab, and scroll to the bottom of the screen.
If it does show the sync as being in progress try connecting the devices to power and Wi-Fi, and allow it to sync overnight.
Cheers.