My knowledge in statistics being very poor, I would like to ask for your valuable help!

Wanting to check any differences between the anwers given in a 5-point likert type question measuring attitudes towards new technologies and the years of service of teachers (0-5 / 6-10 / 11-15 / 16-20 / 21+, namely a variable of 5 groups), I decided to do a Kruskal Wallis H test.

I read online that after performing a Kruskal Wallis test, in case there is a statistically significant difference, one has to perform a post hoc test (a number of Mann-Whitney U tests), in order to check in which groups there actually is statistically significant differences.

However, I cannot understand how to do the Bonferroni correction after performing those Mann Whitney U tests.

I would be very grateful for any help! Thank you!