Your very first ultrasound is going to be the most accurate regardless of lmp. Bc lmp regular or irregular esp are never 100%. In the first few months of pregnancy the baby goes through do many distinct changes that it makes early ultrasound very accurate.
The initial due date the doc gives you can be off with irregular periods because they only have inconsistent dates to go off. But the first ultrasound is usually the most accurate. After that babies can grow at different rates so they become less accurate
The ultrasound will be accurate. Your due date based off last menstrual period will be wrong if it is irregular. But babys growth does not lie, especially in the first trimester.
Ultrasounds are just an image of what's there. They show you the stage of development of the fetus, its measurements, and your uterus. As the baby grows so rapidly in early pregnancy its pretty easy to tell how far along you are.
Ultrasounds have nothing to do with your period