Hola,
Google Sheet has also Macros and has a tool to record Macros too, very similar to Excel (being honest… Google copied this feature from Microsoft).
If you know Excel and have worked with its Macros, doing with GS is almost the same but of course, the functions are different!
Saludos!