After the river.
You are with the best hand of the game.
What your action?! What the action more lucrative?!
There’s is a good rule off the BB necessary in the pot for you can to shove your hand?!
The answer to this depends on the opponent and what their range looks like
If they have mostly
-Missed draws & medium strength hands --> I like to check to let them bluff
-medium & strong made hands --> I like to bet big to get paid off by all
-Missed draws & strong hands --> I like to check raise to get 1 bet from the bluffs and 2 bets from the strong hands
That was assuming we are out of position
If we are in position then it's really just a matter of bet sizing and knowing your opponent
If they have a lot of strong hands I like to bet really really big
If the best hand they can have is kind of one pair, then I'll be around 1/2 pot to get called
There will always be more things to consider to get the 'exact best play' but this is a pretty good starting point in terms of what to consider when choosing your river actions.
Hope that helps!