Configuring Networking in OpenBSD HVM

There was no need to reinstall.
But as you did, why didn’t you set the gateway correctly?

You haven’t said what trouble shooting steps you have taken. Have you
made sure that the issue isn’t with DNS by testing connection to an IP
address?