Here are examples: https://asecuritysite.com/log/rsa_examples.pdf
Select p and q
N= p x q
PHI = (p-1) x (q-1)
e should not share a factor with PHI.
(d x e) mod PHI= 1 (use inverse mod of PHI here or if simple just loop to find d)
Public key (e,N)
Private key (d,N)
Here is inverse mod N: https://asecuritysite.com/encryption/inversemod
And an introduction to RSA: https://www.youtube.com/watch?v=pHES8eNor6k
You are really going to struggle with 64-bit values, as you values will quick over run this.