Classical conditioning is how many fears like agoraphobia develop:
https://anxietyboss.com/can-you-develop-a-fear-of-heights-through-classical-conditioning/. If you want to break this pairing, then please see a therapist who is expert at CBT (cognitive behavioral therapy).