Also the friction of uploading a photo from iOS was (and pretty much still is, despite Instagram's best efforts to enshittify their app) much, much lower for Instagram.
If the Flickr app had had a "quick upload" flow like Instagram, they might have had a chance but (like almost everything Yahoo! did) they fumbled badly and wasted any potential they had.