How to show a list of Post Categories, or Dates

On my post archive page I would like to show a list of Categories for the visitor to choose from, when they click it it will load the archive page showing posts of that category.

I would like to do the same for Years, clicking on a year will show the posts from that year.

How can I do this? I was hoping to find an element for it, but I’m not sure there is one.

Hello, I’m looking to do the same thing you’re asking here. Wondering if you were able to figure it out and if so, what your solution was?

Thanks in advance.