Detect when a player entres a structure

Hello, i want to make a custom kind of raid that activates when you enter a structure, is there any way like an advancement or execute if player type of way to detect and also to summon the mobs inside the structure without suffocating them?
Continue to help post