Just realized I may have accidentally plagiarized some of my bachelor's thesis
This is an appropriate thing to be concerned about and want to rectify; you don't need to fear dire consequences, especially if you take steps to address it. There are different kinds of plagiarism, and also different levels of awareness of what one is doing. Turnitin has an interesting diagram with catchy titles to distinguish them; yours sounds like a mix of &quot;hybrid,&quot; &quot;recycle,&quot; &quot;aggregator,&quot; and &quot;retweet.&quot; Probably the hardest overall concept to understand--and one that may not be fully comprehended by many undergraduates--is that when a key source shows you the way to other sources, you need to be careful that your paper isn't entirely dependent on that key source for its content and/or structure. You should also make sure to acknowledge if a quotation in your paper from a third source is there by way of that key source.
I tend to agree with Anonymous Mathematician's answer to a similar-ish question about plagiarism in a doctoral thesis. In particular, identifying the problem and issuing some sort of errata or revision, prior to anyone else coming across it, is likely your best path. Making a mistake as an undergraduate, and recognizing it and working to rectify it, is unlikely to pose problems for you if it later comes to light. (This is largely the tenor of the answers to a question by an undergrad about publishing in a journal, realizing later that the work contained cited but unquoted direct quotations.)
That said, it would be wise to seek counsel from an ombudsperson at your undergraduate school and your graduate school, as well as your undergrad advisor and your new advisor. You don't want anyone to be surprised by anything and jump to the wrong conclusions. Exactly how to handle the process of corrections might be delicate, but it is certainly the right path to take. The worst case scenario would be if you confessed this to your undergraduate institution to address it, and they were required to report this to your graduate school, which only read the words &quot;academic integrity issue&quot; and rescinded your admission. With proper communication and feeling things out with ombudspeople at both institutions (confidential advisors who can help you navigate the system), you should be able to avoid such a misunderstanding.
Minimally, you should probably clearly and concisely acknowledge your reliance on the other thesis, perhaps as an erratum sheet you could send to your undergrad advisor to stick into a copy of your thesis. It might say something like:

Much of the literature review and methods sections rely on the work of Prior Student's thesis, and I would like to properly acknowledge that debt.
I found sources A, B, C... (discussed on literature review pages X-X, Y-Y, and Z-Z, respectively) through Prior Student's work.
Prior student did similar experiments on __, and I relied on their phrasing for much of the content on pages X-X.

In another approach, you could produce a revised version that somehow does not rely on the previous student's work, and mention in a note that you produced the revision because you realized that you had inappropriately relied too closely on the other student's work. (For instance, find several more papers, read them and reread the sources you had before, and write a new literature review.) However, if you expend this effort without any guidance, you might not distinguish your new work enough, and/or you might be moving toward a different resolution than your advisor and undergraduate institution would find acceptable.
Good luck!