How do i reset mac without screwing up

How should I properly reset my Mac and still keeping OpenCore? Or I have to wipe everything and reinstall OpenCore later

Author: @boeing_a380