Shared Album storage limits
A shared album can hold up to 5000 photos and videos. If you reach
your Shared Album limit, you need to delete some photos or videos before adding new ones. The photos and videos you share (and the comments or likes associated with those photos) stay in iCloud until you or the contributor delete them manually, or until you delete the shared album completely.
The photos and videos in your Shared Albums are kept in iCloud, but they don't
count against your iCloud storage limit.