The cat urinates at the door after being prevented from entering the bedroom because it holds a grudge. The correct approach is to spend more time with it and distract it.

You can try placing cat toys, catnip, or plush toys outside the door to reduce its desire to enter the bedroom. If all the owner's methods fail to prevent the cat from entering the bedroom, it is recommended to give it freedom, and simply ensure it is properly dewormed internally and externally to prevent parasite infections.