Having problem adding a marker to Google Map on tap

I’m surprisingly struggling to find a very simple example of how to add a marker to a Google Map when a user taps on the map.

I have looked around for the past couple of hours, and consulted the Google Maps API documentation, and would appreciate some help!