Your rival is gonna suggest it to you after you beat the grand trial. After beating the captain, I think you're supposed to take a picture or something and when the part of travelling to the next island is mentioned, the rival suggest surfing over there instead of riding the proferssor's boat
Source: Experience and this
The player first gains access to Mantine Surf after Hau suggests they should try it to travel from Big Wave Beach to Heahea Beach.
https://bulbapedia.bulbagarden.net/wiki/Mantine_Surf