Learn Apex
Sharing rules
After OWD and role hierarchy, sharing rules open access for groups of users — criteria- based or ownership-based — without changing who owns the record.
Rules lab

Start with OWD (baseline). If OWD is Private, users only see records they own or that sharing grants. A sharing rule is one way to grant read (or read/write) to roles, public groups, or territories — depending on your org.

Toy story: Bob (peer) vs Alice’s Account

Alice owns one Account. Bob is in the same role. Does Bob see it without opening a manual share?

Account OWD:
Sharing rule: “Peers read each other’s Accounts”
Bob can see Alice’s Account (conceptually): Yes — by rule or OWD.
Remember
// Sharing rules are configured in Setup — not in Apex.
// Apex uses with sharing / stripInaccessible / security checks
// to align code with what the user is allowed to see.