Before your rental period expires, you need to return the vehicle to one of the Donkey Republic drop-off locations. You can see these as black pins with white arrows in the map view of the app when you press on "Drop-off locations for this vehicle" and when you click on your ongoing rental.
Please have in mind, that available drop-off locations can change over time.
Once you're at the right location, park the bike within 10 meters of the exact location marked on the map, in the app, and lock it. Double-check that the lock stays closed. Then tap End Rental.