How to create a WordPress Post Filter that users can use to filter posts by year?

I’m pretty sure you haven’t even try to search for solution… If you did, then I’m pretty sure you would came to this Codex page, where you can find this code:

<select name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">
  <option value=""><?php echo esc_attr( __( 'Select Month' ) ); ?></option> 
  <?php wp_get_archives( array( 'type' => 'monthly', 'format' => 'option', 'show_post_count' => 1 ) ); ?>
</select>

Which displays a drop-down box of monthly archives, in select tags, with the post count displayed.

All you have to do is to change 'monthly' to 'yearly' and start using archive template and global wp_query and not your own custom one.