The argument of str_replace_all is a regular expression.
Here's a way how to do it:
library(tidyverse)
x <- c("a.b.c", "d.e f")
# The pattern is always a "regexp" (regular expression)
str_replace_all(x, pattern = "[.]", replacement = "-")
#> [1] "a-b-c" "d-e f"
# or if fixed, then use the stringr::fixed function
str_replace_all(x, pattern = fixed("."), replacement = "-")
#> [1] "a-b-c" "d-e f"
Created on 2020-09-25 by the reprex package (v0.3.0)