Hi,
I assume you currently using something like “get current level name” and add 1 to it.
You could do this and the check in the game instance (is globally accessible that can store any data you want to be carried between levels).
Where ever you currently have the logic to open the next level you could move it to the game instance and create there a custom event which checks if the current map the last map is. (Number in the branch check)