See "Classless Inter-Domain Routing" [0] (a.k.a. "CIDR")
--
[0]: https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing
You can play with the numbers here [0] to see valid combos, like this: 192.1.254.19/24 (or use a 255.255.255.0 subnet mask)
0 - https://www.calculator.net/ip-subnet-calculator.html?cclass=...
192.168.1.x/24 and 192.168.2.x/24 are two separate networks.