I have observed, throughout life, that a man may do an immense deal of good, if he does not care who gets the credit for it.
Father Strickland, an English Jesuit around 1863
Another one of those sayings that's appeared in numerous forms, but Strickland appears to be the originator. When applied to startups, businesses or organisations in general, it's most useful thought of in relation to "if not me, who", "just do it" and "do as you would be done by".
Don't spend time thinking about how to get credit for doing whatever is it that needs doing, nor resenting a lack of credit after the fact. There's other things to worry about, hopefully others are worrying about and resolving them while you're fixing this one.
All that matters is it needs to be done, so get it done.