You are correct. Any action taken in the current state doesn’t affect future states. Environments with temporal dynamics like those you described are called Markov Decision Processes. All of the tutorials following this one contain descriptions of MDPs, and provide algorithms that can learn to solve them.
Hope that helps.