If I used the oven less than 24 hours ago to bake chicken, can I have coffee with milk when I eat a slice of the cake I baked today?
If the oven was clean, (there wasn’t grease stuck to the walls, and the issue is only absorbed taste in the walls) there are different opinions among the poskim. R’ Moshe Feinstein was of the opinion that it is permitted to eat the cake with milk, others however disagree.
If the oven was greasy, then the cake should not be eaten together with milk.
You may definitely eat the cake before or after the milk, and there is no need to wait, even if the oven was not clean.
Shach Y”D 69-19, Pischei Halacha- Forst pg 227, Igros Moshe Y”D 1-59, Sharei Toras Habayis 3, Darchei Halacha 6-7.