Useful website: https://cidr.xyz/
1. Subnets & CIDR
We use subnet so we don't run out of IPv4 addresses and we keep our resources secure by not public exposing them. Then we use subnet mask to say what IP addresses are private by using Classful Network.
Turns out that wan't enough, so we invented CIDR. IP addresses contain 4 octets, each consisting of 8 bits giving values between 0 and 255. The decimal value that comes after the slash is the number of bits consisting of the routing prefix. This in turn can be translated into a netmask, and also designates how many available addresses are in the block.