Is your due date set by LMP

Emma • My first bundle of joy my Little boy due the 28th off July 💙
Hi my due date is the 28th off July I'm 21 weeks and 3days pregnant.. When I had my ultrasound my due date went from the 17th off July to the 28th so my question is when they do ultrasound dating are they measuring baby from conception because I am totally confused with the 2 week added into the scan do they really do this ?