To get your hamster to trust you, be patient and spend time with them regularly. Feed them consistently, play with them outside of their cage, and talk to them in a calm and friendly manner. Approach them slowly to avoid scaring them. It may take time, but with these steps, your hamster will learn to see you as a source of comfort.