Digital output getting active at powering up ESP

Lots of examples if you search.
This probably isn’t the best example, but it’s one of the first I came across…

In your example you are using pin D7, which is GPIO13
This example uses GPIO2, which is pin D4

Change the sketch or your wiring to suit.

Pete.