So I am trying to understand and make a DQN. But I didn't understand a part. So basically state's Q values computed with the network and the target Q values will also compute with a target network according to the next state. Then the results will pass into the Bellman equation that is (R(t+1) + Q_max(s(t+1),a'). But this taking the maximum thing makes all actions' Q values same, right? And target's Q values being same means the network try to make predictions for different actions (in other words network's outputs) very similar. Am I missing somewhere or is there something I didn't know?
First, the problem you're raising also applies to tabular Q-learning or DQN without the target network because the max operation exists in those algorithms too.
Second, note that the Q-network should be initialised randomly, so that means that the initial $Q(s, a)$ should be different for all states and actions pairs (at least at the beginning).
Let's ignore the target network then.
Now, you should look at algorithm 1 in the DQN paper
You're right the max operation selects only one value. However, as you can see from the algorithm, we don't use this target value to update all state-action pairs, but just one, the one at time-step $t$, denoted by $(s_t, a_t)$ in tabular Q-learning, and $(\phi_t, a_t)$ in DQN. The target would be denoted by $y_t$ in DQN.
Note also that the target is not just the max, but also the reward. The reward you observe may be different for each state-action. So, no, the target value is not always the same, even if you keep the target network frozen forever, which is not usually the case - we update the target network every $C$ steps.