With the new release of salesforce spring ‘21, one can hide show the button based on any field.
(1) On Page edit, once clicked on Highlight Pannel, you would be able to see need to upgrade the Dynamic action, as per below screenhot
(2) Once its enabled, you will be able to see all the Aciton buttons on with icons beside which defines if its available on Desktop, Phone or Both.
(3) One can Arrange the action button for its position to get displayed on the layout and also by clicking on it, User can add the condition to get displayed on the layout
User can add conditions based on the field values or alos using Advance formula as per their requirement to show / hode the action button
(4) Once the condition is added against any Action button, you would be able to see the eye icon beside the Action button which helps to recognied that a condition is added for that particular button of its visibility.
Once an Opportunity is Closed Won, no one should not be able to delete the Opportunity.
Admin can achieve this by adding a condition for the delete button. So till the time Opportunity stage is not closed ’Delete’ is visible and as soon as stage is Closed won, you wont be able to see button on the layout.
Same is shown on the below image.