Your moral character is dependent on your morals. Spend some time thinking about them.
The old saying goes “you can tell a person’s character by how they act when they think no one is looking.”
Having character is all about not just having morals, but living by your morals.
To do that, you have to have morals.
How do you get morals?
By thinking about what it is you value and why.
Take the time to think about what sort of person you want to be and then set about being that person.
Take the time to think through your actions before you act to make sure your actions are consistent with your professed morals.
Not because you want people to think well of you, but because YOU want to think well of you.