Hello: Mike has a good idea. What I’d like to see is the ability to repeat the trouble. That will likely pinpoint the cause. I could name a few more or less likely sources, but your time is better spent getting it to misbehave again and then, if the toilet is suspect, shutting off its water supply as it fills. If the noise stops right then, you know you’ve found the source. Troubleshooting says change one thing at a time and see what effect it has. Best of luck on your exams 😉 .