Search in AliExpress for E6000/8000/9000 T6000/8000/9000 glue.
Use black glue for black phone, clear for white phone.
I've fixed many, many phones with it
20ml is more than enough for plenty of times - I used 110ml ones, would last easily 100 phones if not 200.
Put some around the edge of the phone and where required, leave drying for 5 minutes, then put the cover.
Very little is required, like a thin noodle, be careful around cameras, microphones, speakers, buttons, card slots...
If you attach it too soon, the glue will be too runny and spread everywhere.
After those 5 minutes it'll have thickened and become a sticky rubber, put the cover and give a smooth massage, then place the phone flat in the table and put something flat and heavy on top(~3kg).
After 5 minutes remove the weight and check for oozing around the edges, clean with alcohol and put the weight again, leave for at least two hours, you can leave more if you want, I would leave overnight when possible.
Even when dry, alcohol will remove it, but will also tear it off and break the seal (Will do like a endless thread, the more you clean the more it comes out), so that's why it's better to clean it off when still wet.
The cover will be easily opened with some heating, so not hard and permanent like silicone or other glues.
Needless to say you must clean all the old glue first!