Some devices only need to reach other machines on the tailnet and should never accept connections from them. A laptop in a hotel is an example.
tailscale set --shields-up
tailscale set --shields-up=false
Shields up blocks incoming connections from other devices on your tailnet. The device stays visible and can still start connections itself. The first command turns it on, and --shields-up=false brings back the default behaviour.
The CLI reference puts the flag under tailscale set, which changes only the settings you name. tailscale up lists the flag too, but that command expects you to restate the full set of options you want, so set is the safer one for a quick change.
For managed devices an administrator can enforce the same behaviour with a system policy, which overrides the access rules in the policy file. On a headless daemon, the shieldsUp option in the configuration file does the same.
The caveat is that it blocks everything inbound over Tailscale, including SSH and pings from your own other devices. If you turn it on for a machine that you reach remotely over the tailnet, you can lock yourself out, so only do that when you have another way in.
Further reading: Tailscale CLI reference, Tailscale: manage client preferences