If you need to get started with Office script, here is an explanation of the bare bones requirements to start using it:
https://jkp-ads.com/Articles/Excel-office-script-basics.asp
It can replace some VBA programming, but not all. Office Script lacks several important options, for example:
No multi-document awareness
No prompting the user for information
No events
And at the moment, it only runs in Excel on-line
We will use setValue() to write data in cell This tutorial will tech you 1 Where to write code 2 How to run the program, 3 Writing data in cell using setValue() ----------------- A good hand on example to start your office script journey