I've got an iMac and I use the wired LAN (Ethernet) port.
I also want to use Airdrop, which requires WiFi.
Is there a way I can configure the network settings to use wired LAN for all traffic apart from AirDrop.
The iMac is running Big Sur.
Yes this is possible, I do it all the time!
You can configure priorities in the network section in your system preferences. Since I am on macOS Ventura already my layout is a little different, but I will put a screenshot here anyway:
Then just drag the order in the way you prefer!
Yes, that would be the default setting on macOS if you just connect both Ethernet and WiFi at the same time.
If instead you would want to use WiFi over Ethernet (which is different than your question), you can change the default order by opening
System Preferences >
Network and clicking the gear icon and then
Set Service Order.... Drag them to the order you want, and click OK.