Those are not error message. The let you know that the filter() function from dplyr is "masking" the filter and lag functions from the package stats and some functions from the base package. That means the if you write filter(), you will get the function from dplyr. To use the filter function from the stats package, you have to write stats::filter().
When two packages have functions with the same name, the function from the package loaded last takes precedence and it hides or masks the other function. To access the masked function, you have to explicitly write the package name before the function, like stats::filter() or base::intersect().
It looks like you might be missing the dataset or object you're trying to use. The ToothGrowth dataset should be available in the datasets package, which is included with R. Try loading the datasets package using library(datasets) before accessing ToothGrowth. If the issue persists, double-check your code for any typos or errors. Hope this helps!