Package or Namespace Load failed in inDL- stats.dll

With a R version of 3.6.1 and the latest RStudio version, after downloading rtools40 for R, I have been getting the following error on loading any library :

Error: package or namespace load failed for ‘dplyr’ in inDL(x, as.logical(local), as.logical(now), ...):
unable to load shared object 'C:/Program Files/R/R-3.6.1/library/stats/libs/x64/stats.dll':
LoadLibrary failure: The specified module could not be found.
In addition: Warning message:
package ‘dplyr’ was built under R version 3.6.3

PS: I have included the C:\Users<Name>\Documents\R\win-library\3.6 path as an environment variable.

Please guide. Any help would be greatly appreciated. Thank you.

RTools40 is for being used with R >= 4.0.0, for older R versions you have to download a suitable RTools version from here: