We can't help, really, without more information. For a start:
- What does your Mac's Photos say at the bottom of the Library? Like this:

- What model is your Mac? What macOS does it use?
- Do you have iCloud Photos turned on with both the Mac and the iPhone?
- …Do you have “Optimize Storage” checked in Photos’ Settings for either?
- …Do you see all your iPhone pictures at iCloud.com?
- …Do you see all your Mac pictures at iCloud.com?
- …Do you have more than 10% free storage on your iCloud account?
- Where does your Mac's Photos Library reside-- in the Pictures folder of your internal drive, or on an external drive? or on a network? on iCloud drive?
- What is your storage on this iPhone? At Settings>General>iPhone Storage, my phone says 50.5 GB of 128 GB used. What does yours say? Do you have more than 10% free storage on your iPhone?
- What is your storage on this Mac? At System Settings>General>iStorage, what does yours say? Do you have more than 10% free storage on your Mac?
- Has this problem always existed, or did it just start? Can you think of anything that changed that might affect your device?
Tell us everything you can. With information, we may be able to help…