This is how I make Shepherds Pie. Just a basic outline. It is all done to taste.
Lean ground beef
Saute meat until browned. Add the chopped onion, garlic and celery. Saute until vegetables are tender. Season with salt pepper, thyme. Sprinkle with flour. Cook for a minute or two and add beef broth and Worcestershire sauce. Simmer for 30 minutes or so. Pour into shallow casserole and top with mashed potatoes. Dot with butter and bake until golden.