Create an automation using Time triggers at 09:00, 20:00 and 22:00. Give each trigger a trigger id. Give taht automation a Choose action, that takes the trigger id into account.
Accomplishing this is very easy using the automation editor from the UI.
Condition type: “Trigger”
Trigger ID: trigger id as defined in the “trigger” section
Action type: “Device”
Device: your smart light’s device
Brightness: Mapped brightness value to percent (my smart bulbs are at 255 when 100%, so 10% would be 25)