Cook the macaroni in a large pot of boiling salted water until al dente, according to package instructions. Once cooked, drain and set aside.
In a 3-quart saucepan, melt the butter over medium heat. Once melted, whisk in the flour and cook for about 1 minute until it forms a paste.
Gradually pour in the milk while whisking continuously to avoid lumps. Cook for 5-7 minutes until the mixture thickens.
Stir in the salt, black pepper, and cayenne pepper (if using). Remove from heat, then add the cheddar and mozzarella cheese, stirring until melted and smooth.
Add the drained macaroni to the cheese sauce and mix until the pasta is evenly coated.
Preheat your oven to 350°F (175°C). Transfer the mac and cheese to a baking dish and sprinkle crushed Ritz crackers on top.
Bake in the preheated oven for 20 minutes, or until the top is golden and crispy.
Let the mac and cheese cool slightly before serving to allow the sauce to thicken.