How does the process of buy shares work?

So as a new investor I’m trying to learn how the system works.

So when I place a trade with Freetrade does it go like this:

  1. Order reaches Freetrade(Broker)
  2. They send it to a Market Maker (Barclays?)
  3. The MM put it on the Order Book (LSE/NYSE) to be filled?
  4. Once the order is filled the MM sends back a success code with n purchased shares?

What’s the process? Is there any guides or links online with a good detailed explanation for a beginner. I’m a software engineer so the more info/documentation the better.