Save
Save["filename", symbol] appends definitions associated with the specified symbol to a file.
Save["filename", "patt"] appends definitions associated with all symbols whose names match the string pattern "patt".
Save["filename", "context\"]` appends definitions associated with all symbols in the specified context.
Save["filename", {object1, object2, …}] appends definitions associated with several objects.
Examples
Define a function and save it:
f[x_] := x^2
Save["myfile.wl", f]Save multiple definitions:
Save["defs.wl", {f, g, h}]Please visit the official Wolfram Language Reference for more details.