I wouldn't donate to projects that are already well-funded, or to foundations that spend a lot of money on the support of outside projects (I'd rather fund such projects directly, if I see them worthy).
Overall, I would prioritize small to medium projects that need funding the most. For example, I would donate to Lemmy, but not Mastodon.
Aside from that, I also care about actual openness of the project (i.e. free participation in its improvement), a strong open-source ethos, and independence from corporate backing.