Is it possible to fire an event from a lightning web component and handle in another lightning web component which is not in containment hierarchy? This is achievable in Aura component using application event.
Yes. It can be achieved using the pub-sub model.
To communicate between components that aren’t in the same DOM tree, use a singleton library that follows the publish-subscribe pattern.
Refer to Communicate Between Components documentation for more details.
For example, if you add two components to a Lightning page in Lightning App Builder, use the
pubsubmodule to send events between them.
You can find the
pubsub module here on lwc-recipe