Welcome to the forum. We're all sorry you're part of this elite group, but you'll get loads of support and information here. You might want to update your profile bio with details of your diagnosis and treatment, as that enables others to give you better targeted advice.
A big factor for sex will be if you can have nerve sparing surgery or not. Nerves controlling erection run down the rear and bottom surface of the prostate, and if the cancer doesn't come too close to the prostate surface in these locations, then they can generally be spared. Sometimes, they can be partially spared even if all of them can't. Your urologist/surgeon will be able to tell you how much nerve sparing they expect to be able to do, but they won't know for sure until they open you up, so there are no guarantees before you have the operation.
Even if they are spared, they won't work immediately after the operation, so you will almost certainly have no erections to start with. Recovery is gradual generally takes many months, but can be up to a couple of years. Having frequent erections is actually essential for maintaining the structure of the penis, so is important you embark on a program of Penile Rehabilitation as soon as your surgeon gives the OK (probably a few weeks after the op), which forces periodic erections (e.g. using a penis pump) even though you can't do so naturally, or you will limit the extent to which you will be able to get erections later when the nerves recover. Ask for an appointment with the Erectile Dysfunction (ED) clinic now, and they will go through all this with you, and/or ask here and we can go through it in more detail. You may also be able to get a prescription for a low dose PDE5 inhibitor (such as daily 5mg Tadalafil) which will help preserve the penis tissues over a period of no/fewer erections than normal, and may help achieve better erections earlier.
If nerves cannot be spared, or don't recover even if spared, then the options for erections are less satisfactory, but not impossible. Pills/injections are possible options, as are implants, or using penis pump with rubber rings. Some people have reported finding the implants fantastic.
Orgasms will be dry and feel different as a consequence. Some people report they feel better, some people that they are not as good. An erection is not necessary in order to orgasm, something to bear in mind during the period you can't get a natural erection.
Penis shrinkage is an issue after most prostate cancer treatments. Reports here suggest people lose 1.5"-2" of erect length in the case of prostatectomy. This is because you lose the length of urethra through the prostate, and the urethra has to be reconnected to the bladder. Hence it's doubly important to undertake Penis Rehabilitation during the period of no/reduced erections, or you will lose even more due to lack of use. This reduction might mean some positions you used before won't work as well.