I've seen similar questions, but their commands seem to be outdated. Although I don't have much experience with location-based command blocks, so forgive me if I am wrong.
I am trying to execute a command if a player crosses a certain z-coordinate.
/execute if entity @a[z=-369] run say @a.
I.e., if a player crosses into z=-369, execute the command block.