How can I change the font size of the legend?

I’m working in Grafana v9.5.1 and I want to change the size of the text in the legend of a time series panel. How could I achieve this?

Optionally, you can preview your changes by exiting edit mode and viewing the dashboard. This allows you to see how the text size in the legend appears in the context of the entire dashboard.