Have you activated the SSH Server on the Raspberry Pi?
You can do so by going to the terminal and typing
Interfacing options ->
SSH and selecting
Why did you use the public IP address? Just use the local IP address to access your Raspberry Pi, unless you have port forwarding setup for your Raspberry Pi.