Rather than relying on
tells, which you often dont have, you should look at the board, and how the hand played out. Have you shown weakness, and are there busted draws? Then its more likely, he is bluffing. Also remember that the goal is not to always be "right", because that is not possible. If your opponent bets half pot on the river, you should call, if you are good 1 out of 4 times, which is not all that often.
A lot of the time we also need to simply follow game theory a little bit and call with top of our range. If he bets half pot as a bluff, it needs to work 33% of the time, so to be indifferent to, what he is doing, we should call 2/3 of the time. This is sometimes called MDF, which stands for Minimum Defense Frequenzy. If we call more often than MDF, then he can value own us, but if we fold more, he can run us over.
Please note that MDF only include hands, that beat his bluffs. If our range contains hands like 7 high, because we were drawing to a flush or straight, then these hands are not included in our defense range, because Villain would also have won against them, if he had checked. So maybe against the half pot bet, we can actually sometimes fold 50% or more without making bluffing profitable.
In real time I dont sit and calculate my MDF every hand. The important is to get close enough and adapt to, what the general population in your games are doing. Maybe you can go by "rules" like second pair or top pair bad kicker being good for 2 bets on most runouts, while third pair or worse is only good for 1 bet.
So if two substantial bets have already gone in, and you have As4s on AcQh3s-8s-9d, then you should usually fold to another bet on the river. This will bring you reasonably close to MDF, because if two bets have already gone in, then As4s should be among your worst made hands, that you did not already check or fold.