Lorazepam is benzo. Therefore, it helps with the balance of natural chemicals in the brain. An important neurotransmitter GABA helps produce a calm effect by balancing chemicals. So, the drug directly impacts GABA. So, when GABA increases, the person feels calm and relaxed.
Xanax and Lorazepam both belong to the drug class benzodiazepine. Also, one is stronger or less effective. But if we talk about their action time or how long they stay in the body, it varies.