 There is two main ways that demons have access. Number one is the legal open door. Technicality by which demons get admission to you. It must be repented off and renounced and then the demon that came in through that legal loophole is cast out. The second big way is the sin of opportunity. The sin of opportunity is an opportunity of sin and gives the devil an opportunity to get access to you. These sin opportunities are broken gradually by correcting behavior and progressively surrendering to Jesus.