You never get to know anyone fully in this life. It is a risk we all take. Especially when you get married. Also people can change over time depending on their life experience. Sometimes our beliefs might be x but when we experience certain events in our life they can change completely.
You can try to take precautions though . I think after about 1 year you can pretty much have some sort of idea of who a person is if you see them regularly and having meaningful conversations as opposed to just hanging out. Also you need to meet most of their friends and main family too and observe how they interact with them .
And in a relationship with someone new. hahah.. Hold out on sex as long as possible cuz having sex too soon can make you sometimes stay longer than intended with someone that is not good for you also it may help to weed out players.
I think you should wait at least 6 months and in that time you should have met most of their friends and main family members and are comfortable being around them.
The same can be said for living together. Think a lot about it before you do it. There are a lot of people in bad relationships that are living together but they are afraid of breaking up the relationship because they got so used to living with someone and are afraid of going back to being alone.
Open communication and taking your time to get to know people is the key to trying to understand anyone’s intentions. If there is something they are avoiding talking about it usually is a red flag but not necessarily.