The assumption is that you are trying to create a custom function and have it show up as an autocomplete item when you are typing formulas in cells.
Custom functions will appear in this list if their script includes a JsDoc @customfunction tag, as in the DOUBLE() example below.
/**
* Multiplies the input value by 2.
*
* @param {number} input The value to multiply.
* @return The input multiplied by 2.
* @customfunction
*/
function DOUBLE(input) {
return input * 2;
}
usually the commented portion of JavaScript is not too important but in this case it is. The comment must be properly structured to get the function to render as an autocomplete item when typing formulas in cells
https://developers.google.com/apps-script/guides/sheets/functions#autocomplete