Hi, For a long-lasting erection, you need to work on yourself. First of all, you need to change your mindset, you need to believe in yourself that you can perform better . Your mind should be calm and relaxed. Stress and tensions are the major cause of pre-ejaculation. You can also try different types of exercises and yoga ( eg:- Haṭha yoga).
Do you mean that you ejaculate within a minute of your erection, or the start of sexual activity?
It's technically defined as ejaculation within 1-3 minutes of penetration or other sexual activity always or nearly always, and you are unable to delay it.
There are medications and techniques that can help, but talk to your doctor about it. You'll want to rule out any physical causes.
Climaxing too soon is not erectile dysfunction. You just get overly excited and aren't good at controlling ejaculation. Maybe put your head in a different, less sexy space. You'll still enjoy yourself but perhaps not have the too quick for your partner to enjoy climax.