You can control the way how Sitecore should build the URLs using some properties of the Link Builder.
One such property is AlwaysIncludeServerUrl which is of boolean type.
It Specifies whether the server URL is always included while generating the URL.
You can check the value set for the property in the Sitecore.config file or any other patch file that ...
Looks like your commerce engine was not initialized properly.
You have to reinitialize it.
Steps you can find here: https://doc.sitecore.com/en/developers/90/sitecore-experience-commerce/clean-and-initialize-the-environment.html