Boiling the sugar and water makes a simple syrup, which will distribute easier in the wort... It's easier/faster to use heat to get the sugar dissolved than to do it cold, or just add the sugar dry into the bottling bucket. If you don't care if the bottles are not carbonated the same, then just dump it in dry. But when you mix it manually, you'll risk oxidizing the brew (not saying you'll get it every time, but your risk is greatly increased)...
I've been priming with honey, until the last batch I bottled. With honey, I would heat up some water, and get the honey to dissolve into that, which was then put into the bottling bucket. Last batch I used turbinado sugar instead (I don't want to use the ultra-processed white sugar, personal choice)... I made a simple syrup out of it, to ensure that it would be evenly distributed. I followed normal practices from that point on... I did let it cool down for a while (covered of course) until I was ready to rack the brew on top of it... We'll see how things are in just over 2 weeks...