Yes, websites can detect web scraping if it's done in a way that seems suspicious, like making lots of requests too quickly or trying to access restricted areas. Websites use tricks such as checking user-agent details or watching for patterns in IP addresses to spot automated scraping.
Using proxies help to mask your web scraping activity, especially if you use residential proxies and rotate the IP address you use to access the website with.