This is a huge question and it is probably not possible to answer effectively in the SO Q & A format.
It depends on what you do with it.
If you are building a single product, which consists of many small functions that can be considered independent, then maybe microservices can go.
If you are a large corporate organization where IT is not the main consideration of the board of directors as a competitive advantage, and you work in conditions of strict regulation of the industry, where new standards should be applied in global projects with their own IT departments, some of the new acquisitions, where you You cannot centrally control all endpoints and applications within your organization, then maybe you need an ESB.
I do not want to be accused of trying to list ALL the advantages of both approaches here, as they will not be complete and may be outdated quickly.
Having said that, trying to be useful for the OP:
If you look at how Spotify and Netflix perform microservices, you can find many things that they like about this approach, including but not limited to: the ease of deployment of individual services, decoupled commands, and isolation of failures.
ESBs allow you to centrally administer and apply policies, for example, legal requirements, check everything in one place, and not hope that each team will receive a note on registering everything, provide global statistics on loading and uptime, as well as much more. ESBs grew out of large enterprises where the driver was not the response time of the client on the website and the speed of innovation (among others), but agreements on the level of service, cost-effectiveness and rules (among other things).
In both approaches there is great value. At the moment, a lot has been written about microservices, since ESBs were 10-15 years ago. Maybe this is a progression, maybe it's just a change, maybe it's just that the consumer product companies must sell themselves, and large enterprises like to keep parts private. We can find out in another 10 years. So far, it depends a lot on what you are doing. As in most cases in programming, I would start simply and only go to a more complex solution if you need to.