Most of what I'm about to say is echoed in then above posts but here is my story.
I used to trip a lot on LSD and the probability of having a bad/paranoid/scary experience started to increase until it was over 50%. this is what I did about it:
I stopped taking psychedelics for about a decade while I sorted my life out. I worked on becoming a happy, confident person and started identifying aspects of my life which were causing me to trip with an unhealthy mindset. I realised that I was suffering bad seasonal affective disorder and I was using LSD and MDMA to self medicate. The problem was that it was a) not helping and b) confusing me to the point where I couldn't identify a seasonal pattern of depression through the drug haze and comedowns. I started light therapy and was prescribed SSRI's for the winter months.
When I re-started psychedelic use, I did so with some new rules. I won't take anything unless it's a known quantity of a known substance at known purity. That means no dropping pills bought in clubs or throwing spurious blotters on my tongue. I buy from places like a well known darknet site (mods - am I allowed to mention it?) where I can find out information on purity etc. and buyer feedback. I weigh powders myself and read about routes of administration and their relative potency.
I'm more aware of issues like body-load and how it might affect my trip. If you can't stop thinking about physical discomfort, you can't concentrate on the people around you so you start to withdraw into a shell. Rectal administration helps with this, as does choosing your substances wisely.
I started out again by tripping alone. My attitude is that if you aren't comfortable with yourself, you can't be around other people. I relearnt to navigate the psydedelic landscape in a calm and measured fashion. I started on low dosages and worked up until I found what works for me. As it happens, this led to much higher dose trips than I was expecting to be comfortable with.
Other advice I can give is to work out what causes you paranoia. For me it is ego dissolution. For instance if I take DMT and can't work out the difference between me and not-me, or what the concept of "my room" means, then I feel that my conservatively Christian neighbours downstairs must know what I'm doing and be disapproving or phoning the police. In my case to avoid paranoia, I choose my social triping drugs carefully based on what will give me the full effects of psychedelia without ego dissolution. For me 2c's and NBOMe's are great for this whereas 4-substituted tryptamines are to be avoided.
The last point to make is that there is no such thing as purely recreational psychedelic use. If you aren't doing it to learn something about yourself, then you are missing the point. What you learn might not always be comfortable but it's usually nessicary or at least useful. If you are having a bad time, find out why. It will probably be the key to your future happiness.
Edit: I really disagree with the "take high doses of MDMA" comment above. The way to avoid having a bad time on drugs is not to take more drugs.