Taking time out of your working day to do some stretches and exercises is key to helping maintain good posture. You should also check on posture, ensuring you’re not slumping at your desk. Doing stretches, such as the exaggerated nod, can help prevent tech neck from developing.
Pilates techniques are also great at helping maintain good posture. The downward dog pose can be very useful and there are plenty of free video guides on YouTube. A simple walk outside and mindfulness can help you become aware of any slumping of the back and shoulders. Holding your phone up higher instead of looking down will also help prevent the tilting of your neck. Lifting it up to eye level will be incredibly useful in preventing slumping.
Just remember, prevention is better than cure. Doing simple stretches and making small changes will go a long way in helping you maintain good posture.