First, change the formula in cell C9 to:
=XLOOKUP(D9,A,B,"",0)
This is a much more concise and reliable way of finding the rider's name - it looks in the adjacent cell D9 to find the 'Rider x' value and looks that up in Column A. When it finds a result it returns the corresponding value from column B.
In this way it's performing a dynamic lookup - if you ever added a 'Rider 5', you'd have to update every cell in your original formula to have an IF(D9="Rider 5"...) clause, but with this XLOOKUP it's dynamic and automatic.
That said, the simplest solution to your ask is via Conditional Formatting (Inspector -> Cell -> Conditional Highlighting.
There are two elements to Conditional Formatting you might be missing - first is that you can have any number of conditions to check, the second is how you get it to look at a dynamic value rather than a static one.
In this case, I set a series of rules on cell C9 that look like:

The trick is getting it to reference cells in column B. To do this, you need to click the little green icon that appears at the right hand end of the value field:

This lets you click on another cell in the table to use as a reference (otherwise typing in, say, 'B2' would look for the literal string "B2" rather than the contents of cell B2). Just make sure you click the green check mark to save the change (hitting return/enter won't do it):

Then click on the cell reference and turn on Preserve Row and Preserve Column, so that it always references these exact cells.
So now you can select from the popup menu in column D to select a rider number. That will initiate a XLOOKUP in column C to find the rider's name, which in turn will trigger the Conditional Highlighting to choose the appropriate color,
Optional: One other change I would make is to put the Rider number/names into a separate table. The XLOOKUP() will still work the same, but it helps to separate out the different classes of data (one table for the riders, another table for the Run):

This has the slight speed benefit - since the XLOOKUP() only has to scan column A in the smaller Riders table, and it's also easier to add new riders without having to shuffle the runs around, inserting additional rows, etc.
Having everything in a single table is the Excel-ish way of doing things (although even Excel now offers to separate tables within a sheet, but not in quite such an elegant manner as Numbers does)