Your rights:
If you have bought your tickets separately and the different sections are operated by the same train company, they cannot be considered to be through-tickets. Therefore, if you miss your connection due to a delay, you will neither be entitled to a refund for the missed connection nor to a compensation for the missed connection. You can only claim compensation for the delayed train.
Our advice:
If possible, book one ticket for the whole journey (through-ticket). If this is not possible, check with the railway company the ticket conditions for each section. Railway companies may offer free rebooking or a refund in case of a cancelled train. If you have a travel insurance, check whether such cases are covered.