can mountain ranges form when the plates slide next to eachother

Yes, mountain ranges can form when tectonic plates slide next to each other. This type of plate boundary is called a transform boundary. As the plates slide horizontally past each other, they can become locked due to friction, causing stress to build up. When the stress overcomes the friction, it is released as an earthquake. The motion can also cause the crust to buckle and fold, leading to the formation of mountain ranges. One well-known example of a mountain range formed at a transform boundary is the San Andreas Fault System in California, where the Pacific Plate and the North American Plate are sliding horizontally past each other.