If your visa-on-arrival or tourist visa has expired, you have two main options:
Apply for a New Tourist Visa: You can apply for a new 30, 60, or 90-day tourist visa. To do this, you must first leave the UAE (for example, by taking a short trip to a neighboring country) and then re-enter with the new visa.
Apply for a Residence Visa: If you plan to stay in the UAE long-term, you should apply for a residence visa, which includes obtaining an Emirates ID.