Automation vs script vs scene

Coming from another platform and HA is overwhelming with the possibilities of writing rules for now. I have a ventilation system which speed is controlled with a MySensors MQTT node and 3 connected relays to digital inputs.
Off - Relay1=On
Low - Relay2=On
Med - All relays=Off
High - Relay3=On

As it is a digital input you can not have 2 relays on at the same time. Furthermore i want to be able to control the ventilation from other rules (let’s say calling low speed at night). So what is the best practise to go in this configuration? Writing automation: scenes: or scripts:?

I used scenes when I first started with HA, but rarely use them now. I typically use scripts for things that I think of as functions - code that I’d like to execute from multiple places. Automations are a necessity - they define the rules that trigger something happening. That “something” might just be turning a light on, or it might be calling a script, etc.

Thanks for the tip. So after reading the documentation (which ia actually not that much for a newbie) trying to set up a first script
Is this the correct way to go?

script:
  vent_off:
    sequence:
      - service: mqtt.publish
        data:
        #Set the low relay to 0
          topic: "mygateway1-in/55/1/1/0/2"
          payload: '0'
        #Set the high relay to 0
      - service: mqtt.publish
        data:
          topic: "mygateway1-in/55/3/1/0/"
          payload: '0'
        #Set the off relay to 1
      - service: mqtt.publish
        data:
          topic: "mygateway1-in/55/2/1/0/2"
          payload: '1'
  vent_low:
    sequence: e.t.c like above

At a glance, that looks right. You can then call that script from an automation with:

service: script.vent_off
or
service: script.vent_low

Best quick explanation I have had for automations versus scripts.

Thanks. Puts it in perspective.

i would like to add somethings.

For those who have an iphone, with the last ios and the “new widgets” on ios, all scene are directly available in a widget, and also available on apple watch.

Another avantage of the scene, is that we can make it in the gui, without tiping any code, … for exemple, you nee to power on your tv in netflix, and and light in red, … you just need to select netflix and red in your scene, … no need to make some code, it’s like a simple config.