By starting this topic, you have empirically proven it’s not easier; you misused the Automation Editor in YAML mode and employed outdated automation syntax. Use Visual mode to learn how valid YAML is generated; walk first, then run.
I also recommend you review the documentation’s glossary. You appear to have used terms like script and automation interchangeably but they’re two different concepts in Home Assistant. It makes it more challenging to understand what you did if you use the wrong terminology.
The wait_for_trigger waits several hours (for sunrise). That’s not a robust strategy.
If Home Assistant were to restart during that time period, the automation is terminated and so the lights will not be turned off (at sunrise). It’s a best practice to minimize the length of time that an automation spends in its actions phase.
Move the Sun Trigger to the triggers section and then use a choose to decide what actions to perform based on which one of the two triggers fired.