Nyquist-Shannon sampling theorem only says that your sampling frequency should be greater than twice the bandwidth of the signal. For example, you can modulate your 20 MHz signal at any carrier frequency you need and still get back your original signal by sampling at greater than 40 MHz.
Another example, Voice bandwidth is around 330 Hz to 3.3 KHz. For easy mathematics, we usually band limit it at 4 KHz or better known as Fmax. By Nyquist sampling Theorem, to prevent Aliasing, Sampling frequency (Fs) must be at least 2 times of Fmax.
Thus Fs >= 2*Fmax or 8 KHz.
On the other hand, if you are transmitting a signal of bandwidth B Hz, then the carrier frequency should be significantly greater than B Hz. In practical terms, the carrier frequency is often several times (5-10 times or more) higher than the bandwidth of the message signal to ensure that the modulation process is efficient and can be easily recovered at the receiver.
In general, in most practical communication systems, the sampling frequency is usually greater than the carrier frequency. You can also read about why the sampling frequency should be greater than the carrier frequency. Given these considerations, the sampling frequency is usually designed to meet the Nyquist criterion for the message signal's bandwidth, which often results in a sampling frequency that is higher than the carrier frequency.
Therefore, the sampling frequency must be equal to or greater than twice the highest frequency component (or bandwidth) available in the message signal. Thus, 100 times the frequency of the message signal can be chosen for sampling, and 10 times the frequency of the message signal can be chosen for the carrier signal. Permit the user to choose the frequency of the message signal and adjust the sampling frequency accordingly.
For additional information and MATLAB code, see this article by clicking here