How to change view with ajax and a toggle?

I created 2 block views:



I added the following code in the TWIG template of my homepage :

      <div class="main-timeline">         {{ drupal_view('message_activity_stream_timeline_public', 'block_1') }}         {{ drupal_view('message_activity_stream_timeline_private', 'block_1') }}       </div> 

I do not want to display the 2 blocks at the same time I want to create a toggle button and switch from block message_activity_stream_timeline_public to message_activity_stream_timeline_private with ajax and vice versa.

How can I do this ?