Marker on google maps

Good afternoon, everyone. I use google maps. How to make it possible to save a marker that would include latitude and longitude data and also assign a name so that at any time you can click and it appears on the map

I need something like a marker that I click on the map and in the future I need to save it, preferably with the ability to give it a name. What was offered before seems to be completely different

So that the user creates it himself

Use on map click to save info in a database for example firebase…An example with markers data stored (json format) in firebase can be found

I did, but it’s no use 0 unfortunately

the result that I want to work as a GPS tracker. That is, I click on the dig and saves a mark on the map

Did you try search in community?
There are many examples about that.