They do glue them together, the majority being on the logic board such as CPU, GPU, SSD, T2 chip and various other components. If one of those components fails, they will replace with new or refurbished at Apples discretion. From Apples Repair Terms...
“In servicing your product, Apple may use parts or products that are new or refurbished and equivalent to new in performance and reliability. “
Apple MacBook Pro Logic Board