8.0 defaults to utf8mb4_0900_ai_ci, which sorts and compares differently from the utf8mb4_general_ci a 5.7 database is almost certainly using — and a join between two columns with different collations cannot use an index.
SELECT table_name, column_name, collation_name
FROM information_schema.columns
WHERE table_schema = 'shop' AND collation_name IS NOT NULL
GROUP BY collation_name;
-- and the symptom of a mismatch, in EXPLAIN:
-- Using where; Using join buffer (Block Nested Loop)
The block nested loop in a plan that used to use an index is the tell, and the cause is a new table created with the server default joining an old table that was converted from 5.7. Both sides have to agree. Setting the collation explicitly in every CREATE TABLE rather than relying on the server default is the discipline that prevents it, and auditing the whole schema after an upgrade takes one query.