Ideally, you add a button to the PDF, select the MouseUp trigger on the properties dialog for the button, And then select "Execute a menu item" for the action. Then select the "Edit->Save" menu item.
Unfortunately this doesn't work because the Save menu item is blacklisted for form operations.
Here's an article on how it's done.
https://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript