And God said, “Let the earth sprout vegetation, plants yielding seed, and fruit trees bearing fruit in which is their seed, each according to its kind, on the earth.” And it was so.
#genesis 1:11

What came first, the tree or the nut? We can't say from this verse. The earth sprouting the plants could imply the existence of seeds embedded in the soil, or it could be that the first generation of plants were created directly from dirt just like man.