Not being able to stay hard is an issue for many people. There are prescripted drugs for this, if there is an actual physical problem. It is meant for people who have a problem getting their penis hard and/or keeping it hard. For other people, it can give the opposite effect, or give an erection that is so hard you need a doctor to get it down. Some of these drugs can be deadly in combination with poppers, or with medicines for heart problems or vascular (blood vessel) problems.
It is a bad idea to buy copies, so called generic versions, on the Internet. If you have erection problems or want to keep your penis hard for a long time, talk to a doctor. Do not self-medicate.
There are many different reasons for erection problems. Often, mental and social issues affect your ability to get sexually excited or to get your penis hard and keep it hard. A cock ring can help with keeping it hard. If you often have problems with this, talk to a doctor who can see if there are any physical reasons, and give you medical help if you need it. There are many different medicines that are said to be similar to these drugs. Your doctor can help you choose the right one for you. Always follow the dose recommended by the doctor.