You have just been given instructions that would destroy every bit of data you have beyond any chance of recovery, if you don't have backups, and also would not solve the problem.
The startup drive is failing, or there is some other internal hardware fault.
Back up all data on the drive immediately if you don't already have a current backup. There are ways to back up a computer that isn't fully functional—ask if you need guidance.
Make a "Genius" appointment at an Apple Store, or go to another authorized service provider.
If privacy is a concern, erase the data partition(s) with the option to write zeros* (do this only if you have at least two complete, independent backups, and you know how to restore to an empty drive from any of them.) Don’t erase the recovery partition, if present.
Keeping your confidential data secure during hardware repair
Apple also recommends that you deauthorize a device in the iTunes Store before having it serviced.
*An SSD doesn't need to be zeroed.