This is my Script:
spooltest.sql
------------------------
spool C:\Users\DoICT_Borhanuddin\Desktop\record.txt append
alter session set container=starpdb;
startup
spool off;
-------------------------
Adding an append Keyword at the end of the spool line will let you keep the old text instead of overwriting it every time you run the script.