By default, BGP automatically selects the router ID in the system view. If the IP address of a physical interface is used as the router ID, route flapping occurs when the IP address of the physical interface changes. To enhance network stability, configuring the address of a loopback interface as the router ID is recommended.
In fact, we often use the loopback address as the router id of BGP.