Hello,
You can't add a legend directly to your map, it must be added to a layout. If there is no layout view active the legend buttons will be greyed out.
Learn more about inserting a layout here: https://pro.arcgis.com/en/pro-app/latest/help/layouts/add-a-layout-to-your-project.htm
And about adding a legend here: https://pro.arcgis.com/en/pro-app/2.7/help/layouts/add-a-legend.htm
Cheers,
Aubri