One tip is to put all the objects that you want to be solid and impassable into a group called something like “solid”. Then in your events you can just have one event to do a collision check with “solid” rather than having to have a collision-checking event for every object you want to be impassable.
Another way to achieve the same result is to have a single object type that you use to mark out the areas you don’t want players getting into and collision check those objects rather than every tree, every rock etc. If you hide these barrier objects when the scene starts they will act like invisible forcefields. One benefit of doing this is the object can just be a tiny square sprite that you scale in the scene editor to be the size and shape that you want.
In the screenshot below, the yellow rectangles are these barrier objects that aren’t visible in the final game, but set the limits for the player movement. The similar semi-transparent blue objects block enemy movement in the same way. They all started as 8x8 sprites that I stretched and rotated and copied in the scene editor.