Preheat your oven to 375°F (190°C) and grease a 9×13-inch baking dish.
Bring a large pot of salted water to a boil. Cook the lasagna noodles according to package instructions until al dente. Drain and set aside.
In a large skillet over medium heat, add olive oil. Sauté the onion for about 3–4 minutes until translucent. Add garlic and sauté for another minute. Toss in mushrooms, thyme, salt, and pepper; cook until softened. Stir in spinach until wilted.
Spread a layer of marinara sauce on the bottom of the baking dish. Layer three cooked noodles, half of the ricotta, half of the mushroom filling, and one-third of mozzarella and Parmesan. Repeat layers, finishing with marinara sauce on top.
Cover with foil and bake for about 25 minutes. Remove foil and bake uncovered for an additional 10–15 minutes until cheese is bubbly and golden brown.
Let cool slightly before slicing. Garnish with fresh basil leaves and serve warm.