As others have stated matrix and XMPP are good options. I myself am an admitted matrix fan boy, so i lean heavy that way....but the choice is yours. For matrix, i know that beyond the mobile and web browser clients, there are several regular, (non-browser), good ol' fashion desktop style applications (scroll down on this url: https://matrix.org/clients/) for linux, windows and Mac operating systems. The story is likely similar on XMPP side, but i have not used xmpp in many years.
On computer is generally a _much_ easier case to design for since it can be assumed that the computer is available most of the time to receive messages. Mobile is significantly harder because most of the time it's not available to receive. This ends up in a situation where caching servers are a required necessity, but have to be built to be private. From that, computers become a derivative case for an increasingly niche minority of users/use cases
My family uses Matrix. The default Element interface works in the browser, on desktop, and on mobile app. It was chosen as it's pretty much the only solution that is open-source, supports all devices, has E2EE, supports text/voice/video, and can be selfhosted.
Clunkier story, but XMPP checks all those boxes as well, but there are better clients (sadly also crappier clients which is part of the issue) and it's far older.
I mean you can use SIP too, but the fact about Matrix and Element is that it's a seamless experience. Point users to the app, issue accounts, provide the server address, and they're good to go. The interface and experience is just like a commercial chat app so there's little resistance.
I keep wanting to like Tox, but it requires you to setup a server at a minimum in order to use it in the primary messaging/chat use case of a mobile device. Realistically this is an insurmountable hurdle to an average user and the network effect can't be overcome. Outside that use case they're entering an already heavily saturated market with little value add relative to competitors.
The proliferation of mobile-only apps is making me sick.