Yes, you should let your sourdough bread cool completely before slicing, ideally for at least 2-3 hours. Slicing warm bread results in a gummy texture and a less defined crumb structure.
When sourdough bread comes out of the oven, the internal structure is still setting. The starches are still gelatinizing, and moisture is still evenly distributing throughout the loaf. If you slice into it while it's warm, you interrupt this process. The heat causes the starches to become sticky, leading to a gummy texture. Furthermore, the steam escaping from the cut surfaces can cause the crust to become soggy. Allowing the bread to cool completely allows the starches to fully set, the moisture to redistribute, and the crumb structure to stabilize, resulting in a cleaner slice and a more enjoyable texture. The cooling process also enhances the flavor of the bread as the volatile compounds have time to develop and mellow.
If you're impatient, you can speed up the cooling process slightly by placing the loaf on a wire rack. This allows air to circulate around the entire loaf, helping it cool more evenly. However, resist the urge to slice it until it's completely cool to the touch.