Lock folder and all its contents such that it is temporarily read-only I want to lock a folder from modification, which includes all its contents. I thought that this could be accomplished with the "Get Info" window and selecting the "Locked" checkbox, but this does not affect the contents of the folder.

I am on an iMac running macOS Catalina 10.15.4
Open Terminal
cd to/folder
chmod -R a-w .


To undo run chmod -R u+w . instead. 

The first command recursively removes wrote access from all users, the second gives write access to the current user (because that‘s what is the default anyway).