You were required to apply for a new ESTA, if you want to use the Visa Waiver Program, once your visa was denied. In general, it’s usually not a good idea to apply for a B visa if you are from a VWP country, unless truly necessary.
8 CFR § 217.5 – Electronic System for Travel Authorization
(e) New travel authorization required. A new travel authorization is
required if any of the following occur: ….(5) The circumstances underlying the alien’s previous responses to any
of the ESTA application questions requiring a “yes” or “no” response
(eligibility questions) have changed.
Have you ever been denied a U.S. visa you applied for with your
current or previous passport, or have you ever been refused admission
to the United States or withdrawn your application for admission at a
U.S. port of entry?
ESTA is a pre-approval to enter the US under the Visa Waiver Program (VWP). It does NOT guarantee entry to the US, and all of the criteria of the VWP still apply at the time of entry.
One of the requirements of the VWP is that it can not be used if you have been refused a US Visa in the past.
Thus despite holding a (potentially) valid ESTA, you are not elligible to enter the US using the Visa Waiver Program. The only way that you will be allowed entry is to apply for a Visa, and hope that it is approved this time…
Credit:stackoverflow.com‘