It's best to convey your feelings of gratitude to the other person, but I think some people are not good at it. There are words, emails, letters, etc. for retirement greetings. If you send them by letter or email, you may want to refer to the example sentences for retirement.

There are various cases of retirement. Retirement, mid-career retirement, retirement from the company, re-employment in a new workplace, etc. It depends on the other party.