Maps are not safe for concurrent use. If multiple goroutines access a map and at least one writes, you need synchronization:
// Not safe - may crash
go func() { m["key"] = 1 }()
go func() { _ = m["key"] }()
Use sync.Mutex to protect the map, or use sync.Map for concurrent access. You'll learn more about this in the concurrency section.