I was trying to set something up so that I can SSH into my Raspberry Pi 4B from anywhere via remote forwarding. To do this I wanted to use PuTTY, specifically, I wanted to add a new forwarded port. However on PuTTY to set up a forwarded port it requires me to add a hostname and port in the format "host.name:port".The issue is that every time I write "raspberrypi:22" I try to connect and nothing happens. Have I made a mistake with the port number or formatting anything?
Port forwarding in SSH is designed for SSH tunnels, not to forward your SSH connection to outside world.
To be able to connect to your Pi from outside you may setup port forwarding on your router, which generally a bad idea. Port forwarding is one of the least secure approaches for establishing remote communications. Better way is to set up VPN connection to you home network (can be often done using your internet router). VPN, however, is also not considered to be high security solution, you may want to learn about the alternatives. Depending in what you exactly want to achieve you may use one or another solution.