Explore real implementations of RSA, e.g., PKCS\#1 v2.2: RSA Cryptography Standard [Lab12].
Emphasis should be that, in reality, one is not encrypting a generic plaintext message, but an AES key to transmit securely. On the plus side, this is already a number, so encoding is not the issue. The problem is that an AES key is short relative to required modulus size. This means the AES keys are not randomly distributed in the RSA key space, producing a vulnerability and necessitating certain padding schemes.