It's important to set the max parallelism before going into production, and to set it high enough to account for future growth. And in order to help avoid data skew, it's good to set the max parallelism to something like 4-5 times the maximum you actually expect.
What this is doing is determining the number of key groups that the keys will be hashed into. Key groups are assigned to task slots, with each slot processing the data for one or more key groups.
The number of kafka partitions determines the maximum number of kafka source instances you can assign work to. Your actual parallelism can be higher than this, but if it is you will have some idle instances of the kafka source operator.
https://nightlies.apache.org/flink/flink-docs-stable/docs/ops/production_ready/#set-an-explicit-max-parallelism provides some additional information.