IPv6 is easier in that there is a well-defined protocol, and you can forget about counting hosts.
Router advertisements (RA) are multicast from routers to announce themselves. Attached prefix information defines one or more prefixes, with an L bit set for hosts that are known to be on-link.
RA source IP address is a link local address, which cannot be routed and thus must be on-link. Hosts can use this address as a default route.
A default gateway may send a redirect telling senders that a destination is actually on-link, and can be sent there directly.
There should exist a means to manually set a prefix as on-link.
That's all, these fully define what hosts are on this layer 2 and which are at least one router away.
This is of course only the basics about host networking. Prefixes are also communicated with DHCP PD, or routing protocols.
Further reading: Russ White on on-link,
rfc 5942 IPv6 Subnet Model: The Relationship between Links and Subnet Prefixes
Regarding right-sizing prefixes to number of hosts, do not bother. The smallest reasonable size prefix is /64 which is effectively unlimited.
Lest you be concerned that you learned that binary math for nothing, it is still useful in address planning. Now the question becomes, will the number of nets your business unit need exceed the number of /64s in a /48.