I work 4x12hr shifts and rotate days and nights week to week, sleeping ~9pm-5am one week, and ~7am-3pm the filling week- so I have tried various things to ensure I get decent sleep.
The one thing that hands down affected my sleep in the most positive way is to avoid screen time for 2-3hrs before bed. If I need to be up at 5 and my goal is to get to sleep at 9, then my phone is going onto the charger at 6:30pm and not being picked up unless it's an emergency! Same goes for tv- I used to watch tv before bed and found I couldn't sleep well. I now read in bed and it not only doesn't keep me up like tv watching did, but I actually makes me drowsy and I fall asleep easier. It's hard to not give in and be watching tv while on my phone... but I realized how much better all aspects of my life are if I sleep well, and it's a sacrifice that has to be made. Plus, I can use my phone whenever I want at any other time during the day so it's not actually that big of a sacrifice.
Secondary things to that- avoiding caffeine after 12, having a dedicated wind down period before bed, making my bed when I wake up so it's all ready for me at bedtime, keeping my room around 20C when it's time to sleep, using a white noise machine, having a shower before bed, using a diffuser with a 'sleep blend' of oils in my bedroom, blackout curtains, and avoiding alcohol on work nights.
I have typed on an iOS keyboard for over a decade and never considered the keyboard to be bad at all. To type a . I hit the space bar twice, or I click the 123 with me left thumb and then they period or symbol I need... never randomly typing periods