What's past is past and can't be changed. It is good that you have learned about this issue, but I suggest that you ignore it and just list it like any other publication. There is no major harm done here, even though such "gift" authorship is frowned on in many (not all) fields.
If asked to explain it, just say that you were, at the time, less sophisticated as you were an undergraduate.
Alternatively, you could leave the paper off of your CV, but that can look strange if the paper surfaces.
But the bottom line here is that, as an undergraduate, inexperienced in such things, you did nothing wrong.
And, in some fields, a lot of people get listed as authors even if their intellectual contribution was minimal, since their work is essential to carrying on the work of the lab. Whether that applies in your case, I can't say. Your advisor, PI, might be worth having a conversation about this issue. They may assure you, or not, but their opinion is worth hearing.
I need to add a few things for context. There are certainly a lot of people who don't accept what they call "gift" authorship in any form and so hate on answers like this one. But the question of what is a gift and what is earned can be subtle. In most fields, where one or a few people work together, without need of extensive and long running laboratories with all of the technicians that are required for that, it is a pretty simple question and gift authorship is heavily frowned on in those fields.
But there are some fields in which nothing gets done without a lot of people contributing over a long period of time. When a paper comes out of CERN, for example, the list of authors might be very long. An experiment might take years to set up and require hundreds of technicians, without whom there would be no breakthrough at all. The work is simply impossible without them. In those situations, lots of people get authorship for their contributions.
There have been a few papers, in fact, where the list of authors has been longer than the paper itself. But, in those fields, it is understood what it means and the order of authorship might be vitally important to help sort it out.
It is, I think, a mistake, for those in other fields with a different work process, to judge these people.
See, for example this paper with more than 5000 authors