How do they calculate due date?


I was on the phone with the nurse to set up my first pre natal appointment and she said our baby would be due around March 19th, but my last period was June 12th and she said I'm already four weeks!? I'm so confused 🤷🏼‍♀️ I'm a first time mom so I was just wondering if anyone had any insights!