One idea
A slow query usually reads too many rows. Your job is to prove what it reads, then reduce the work.
Use EXPLAIN before and after a change. Do not guess from vibes or one lucky run.
What slow means
In a hackathon project, slow often means a page feels stuck when seed data grows. Your laptop may hide the issue when you have only 20 rows.
Test with enough seed data to make bad queries visible. Even a few thousand rows is useful for a student project.