Strongly disagree with Goro and make. If your level of involvement rises to that of a coauthor, then you should be on the paper, period. What constitutes an appropriate level of involvement to be a coauthor varies somewhat by PI, but if you are contributing a substantial amount of manpower, contributing to discussions, and helping write the manuscript, then you should definitely be a coauthor. You need to have a candid conversation with your PI to see if they think you deserve to be a coauthor, and if they don't think you've done enough then you should ask what other responsibilities you need to take on to be considered a coauthor. If your PI is one of those that thinks no undergrads should be listed as authors, then you should run.
If you feel like you have enough experience to lead your own projects, then you should make that desire clear as well.
Goro thinks you shouldn't have this conversation- that is absolutely the wrong advice and contributes to toxic environments and exploitation of undergrad labor.