I understand that you want to save some workspace variables for later use.
You can refer to the following documentation link to know about different ways of saving and loading workspace variables in MATLAB : https://www.mathworks.com/help/releases/R2021a/matlab/matlab_env/save-load-and-delete-workspace-variables.html
I hope this will help!