Cheaxeexesh78 The traffic on the roads is unpredictable and I cannot say if 38 minutes are enough.
If you miss your connection in Domodossola you can take the next train to Brig and Zermatt.
Point-to-point tickets and passes, for example Saver Day Passes, can be use in every train between Domodossola and Zermatt but Supersaver Tickets can be use only in the mentioned train. In the last case, if you miss this train, you should go to the ticket office in Domodossola and ask to obtain a confirmation of the delay.