Even though it’s kind of easy to figure out when the movie is set, there’s still debate on the internet where exactly in the MCU timeline Black Widow is set. While most expect it to be after Civil War, there are some people who still can’t accept the events of Avengers: Endgame and think it’s set after that (in order to reverse the sacrifices in that story).
On The Late Show, Scarlett Johansson confirms it’s set when everyone though:
“It takes after the Civil War and before the Infinity War.”
You can see Scarlett talk about the Black Widow movie, and why it took so long to happen, beginning at about seven minutes into this clip: