@Ka**
, in Thailand, you take your old passport with the visa and your new passport to any immigration office and they officially move it into your new passport.
It’s not difficult. I’ve done it before.
As far as losing a passport, that would be very inconvenient, but you gotta treat it like gold and it’s wise to have photos of your details and visa on your phone as well as have it uploaded to the cloud.