To start, cook the cheese sauce first. Prep everything to before starting. Begin with a medium to large pot and sauté the sliced onions on medium heat until caramelized. This will take 15-20 minutes. Continue to mix them to avoid burning as they wither.
Once they have caramelized, add in the butter. After the butter has melted add in the flour and cook the flour with the onion for a minute or two. Then, gradually pour in the beef broth.
Next, add in the thyme then the heavy cream. Now, gradually 1 cup of each cheese. Once the cheese is fully melted you can turn off the heat. Lastly add salt and pepper to taste.
Preheat the oven to 400℉ and make the macaroni according to the package instructions. While the pasta is boiling, slice the bread. When the pasta is done cooking, drain it then toss immediately into the cheese sauce and onions. Mix everything well.
Now, add half of the contents into the baking dish. Sprinkle the 1 cup of mozzarella cheese across then add the remaining macaroni on top of that. For the final layer, add rest of the cheese then layer the slices of bread on top.
Bake for 25 minutes then in the last minutes turn on the broil to toast the tops of the bread if needed. Remove and allow to cool a bit before serving, enjoy.