ax.set_title set a title for a particular subplot while plt.title for the full figure. Since you have only one plot in this figure, it does not matter which one you use. However, I would suggest to use ax object if available and to be consistent with the lines above.
https://github.com/fearandwonder/intro-data-capstone-biodiversity/blob/84dc9edecb1c757d28f0e8179bcde7ee60430a48/Codecademy_Intro-to-Data-Analysis_Capstone-Project_S-Houghton/capstone_project_code.py#L264-L267
ax.set_title
set a title for a particular subplot whileplt.title
for the full figure. Since you have only one plot in this figure, it does not matter which one you use. However, I would suggest to useax
object if available and to be consistent with the lines above.