Early ejaculation and erectile dysfunction could be due to many reasons. Anxiety being the most. So first try relaxation techniques like yoga,meditation etc and distraction method. Then try to cut down on any habits like alcohol, smoking or drugs. This will help delay ejaculation. If there's no improvement then you must be investigated for any comorbidities like
diabetes hypertension hypercholestrolemia. Treating these comorbidities also can delay ejaculation. Also any associated erectile dysfunction will also have to be treated. Medically there are many options like oral medications and topical creams. If the above conservative measure do not help kindly consult psychiatrist and dermatologist they will help you... If it's due to hormonal or physical causes they will refer you to endocrinologist.