An iPhone XS that boots but restarts every few minutes is most likely caused by a faulty battery or dock connector.
open