Do the games bought in one country will work on PS4 which is bought in another country?

In general, you are good with playing your owned games anywhere in the world (until specific game publisher decides to mess with their games). From this playstation.com blog

Do PS4 games have regional locks?

In general, neither digital nor disc-based games will be region locked, but PlayStation recommends that all users purchase games at the region of their residence to guarantee the best overall experience and customer service. In certain instances, a software publisher may choose to region lock a game title for specific reasons, but Sony Computer Entertainment expects these instances to be uncommon.

However, some multiplayer games may have region based matchmaking, this could make it impossible to play with your friends from other regions.