Which Late 2015? There’s 3…: 21.5-inch, retina 4K 21.5-inch, and Retina 5K 27-inch.
Could be overheating, which should be easy to check on the back, usually in the area of the CPU (back left side), and the fan is just not catching up for a bit, causing the system to lockup.
(Maybe you don’t hear the fan because it is not spinning like it should (or maybe the cooling paths inside need to be cleaned out on a 6 year-old computer – might be something to think about, too)
Heat may not be your issue, but if it does, you will feel a lot of heat in the back, and it’s something to watch out for, if it happens again.
A freeze-up can also indicate a problem with your boot drive… Do you have fusion drive, or flash storage – or, a hard drive (the 21.5-inch comes standard with a 5400-RPM laptop hard drive, which is sometimes just not a happy beast with the newer macOS systems, and 5 or 6 years can be approaching end-of-life for a mechanical hard drive.