I got bored of Minecraft so this is what I'm doing for a solution. The command in theory is supposed to slow me down whenever I touch air.
The command I am trying is the following:
/execute if block ~ ~2 ~ Minecraft:air as @a run effect give @a Minecraft:slowness 999999 20 true
Edit: Does it matter if it is conditional or unconditional. Same question for command block type.