As you have mentioned that you are able to share the script but don't know how to test it as an add-on for sheet, so I'll only write how to test it as add-on, let me know if you need more help.
Create a test configuration
If you do not have one already, create a Sheet, Doc or Form to test the add-on with. If desired, format and fill the doc with data that the add-on will be operating on.
Open the script project containing your add-on in the script editor.
(Optional) You may wish to save a version of your project by selecting File > Manage versions, then Save New Version. Close the Manage Versions dialog.
Select Run > Test as add-on.
In the Select version box, choose a code version or select "Test with latest code".
In the Installation Config box, select the initial authorization state for the test.
Click the Select Doc button. This will bring up a file select dialog. Find the test Sheet, Doc or Form you want to test the add-on on, click it, and then click Select to close the dialog.
Click Save to save the test configuration.
Run a test configuration
Open the script project containing your add-on in the script editor.
Select Run > Test as add-on.
Under Execute Saved Test, find the test to execute and select it. Click Test.
I have taken the text from this documentation you should go through these for reference too.
https://developers.google.com/apps-script/add-ons/test#create_a_test_configuration
https://developers.google.com/apps-script/add-ons/test#run_a_test_configuration