Use of elevation in automation

Hello, could someone give me the golden tip of using elevation in my automation? its working good for now, but I want to use elevation to get it more specific when its getting darker.

- alias: Carport Lamp Aan
  trigger:
    platform: sun
    event: sunset
  action:
    service: light.turn_on
    entity_id: light.carport
- alias: Carport Lamp Uit
  trigger:
    platform: time
    at: '21:45:00'
  action:
    service: light.turn_off
    entity_id: light.carport

There’s an example in the documentation, Sun Elevation Trigger, that shows how to trigger based on the sun’s elevation.

Thank you for trying to help me, but could you be more specific? what should I change in my automation?

Sure, I can be more specific. Which part of the example do you need help understanding?