Hello,
After BGP imports a route of another protocol, the next hop of the route becomes 0.0.0.0. The route must exist on the local node because the route can be imported by BGP. That is, the route is not a newly added one, and only the reference count of the route increases.
The route is not preferred by RM. Therefore, the next hop of the route does not matter. When sending the route to its IBGP or EBGP peers, BGP changes the next hop of the route to a proper one based on the rules defined in RFC 4271. Generally, it is recommended that the next hop of the route should be changed to the local address used to set up a connection.
The processing of IPv6 routes is similar to that of IPv4 routes, and is not mentioned here.
Hope to help you!