How do i change my pokéstop to a gym

How do i change my pokéstop to a gym

Pokestop have chance to turn into gym when the number of wayspot within certain cell reach certain value.

2 wayspots >> 1 gym

6 wayspots >>> 2 gyms

20 wayspots >> 3 gyms

You might want to read here

https://pokemongohub.net/post/article/comprehensive-guide-s2-cells-pokemon-go/

Please know that sponsored gym count towards these number