The term "texting" has unfortunately come to be a more general term for sending messages with someone, typically over a phone. Thi is unfortunate, because texting is actually more complicated than that. Texting is a term that technically means sending messages over the SMS protocol, which is unencrypted. Since your messages are unencrypted when using the SMS protocol, anyone with the right equipment is able to intercept and read them.
When people who use an iPhone complain about texting with Android users, that is because iPhones' messaging application actually doesn't use the SMS protocol with other iPhones, it uses a special protocol that supports a lot of features that SMS doesn't have, but Android actually uses the SMS protocol. So when an iPhone user texts an Android user the iPhone starts using the SMS protocol, which is different than what the user is used to, they think its the Android phone's fault, which it actually isn't because the iMessage system is proprietary and Apple has refused to integrate with other devices. Even though Apple has recently started adapting RCS, I still would be scepticle given their track record. Also, the end-to-end encryption that Apple brags about iMessage having doesn't stop Apple from reading the messages.
So, if Android uses SMS which is unencrypted, and iPhone's use iMessage which doesn't integrate with other devices and can be read by Apple, what are you supposed to use?
There are a lot of options when it comes to open source messaging applications, but some are better than others, and some are not actually very secure at all. So, then, here's the list.
Session is a private and open source instant messaging app that employs a user hosted onion network to route messages. Along with the self hosted service nodes, Session also requires no user identification to use, is completely open source, and was created by a non profit. Session does have a fairly strange cryptogrphay scheme, but it has been audited. Right now Session is going through a transition period from using the Oxen cryptocurrency network to the new Session Token network, but they claim it will not change for the end user. I have been using Session for years, and couldn't reccommend it more. It is highly secure and private, and you are able to self host messaging nodes meaning you don't even have to trust Session in order to be confident your messages are private because it's decentralized (unlike Signal). Session is a very solid choice for a private messenger whether you are experienced with technology or not, although I would recommend a self hosted XMPP server to more experienced users it is still a very good choice. Session is not difficult to use, it has an incredibly intuitive user interface, it can be downloaded on all platforms and there is an F-Droid repository for it, you should absolutely use it, but you might want something more robust if you're sharing government secrets.
Matrix is a really cool messaging protocol. It's got everything, from the intuitive user interface and rich messaging you would expect from something like Discord, while being self hostable, decentralized, federated, and completely open source. However, it's certainly not perfect. A full fledged Matrix server is a monumental pain in the ass to set up and keep running in good condition, and it can be much more challenging to get someone who is unnaccustomed to private messaging to get a client for than something like Session. Also, as it has so many features it also has a much larger attack surface, and it is still fairly new as far as protocols go. The ecosystem also feels a little locked down, the only real choice of server is Synapse, and the most popular client by far is Element (although you should really try out Cinny). You can use a public Matrix server and not have to deal with setting up your own, but that is not really the most secure option, and goes against the philosophy of decentralization that Matrix was built on.
Despite some of these issues, Matrix is still a fantastic choice, especially because of what it has to offer to developers. Matrix is pretty good for end users, but for developers, it is really amazing. The way the protocol was built allows for bridges between huge amounts of software and the Matrix ecosystem, there are even bridges for proprietary services like Discord and Twitter! These bridges aren't clunky, either, and since they are open source, that means that if you are trying to get someone to switch to Matrix, you can just set up a bridge for a service they already use and hook it up to some Matrix instance you control! Setting up a bridge and using Matrix over some proprietary and spyware filled service like Discord is still not ideal, but it can be a pretty big start for some people.
XMPP is a true classic in the privacy world, and to this day is still one of the best options available. XMPP is a protocol like Matrix is, but has been around for much longer, and has a much more diverse ecosystem surrounding it. There are dozens of different servers to choose from, and the same goes for clients. XMPP is also a much more lightweight protocol than Matrix is, which allows for you to select the specific features you want on your server, and even extend its capabilities through XEPs. One important thing to keep in mind, though, is that XMPP is not encrypted by default on most server software. This is not very difficult to fix, as it just takes a little configuration, but is still something to keep in mind as you do not want to forget to set it up properly. If hosting your own XMPP server you should also make sure to setup OMEMO for end to end encryption, and also ensure that your client supports it.
Besides the extra configuration required when setting up an XMPP server, it is still significantly easier to run than a Matrix server, and uses fewer system resources as well. XMPP is also significantly more mature than Matrix, and has undergone vast amounts of security and privacy improvements since its inception. XMPP does not have the the rich messaging that Matrix does, but the the great thing about XMPP is its simplicity and minimalism in focusing on doing messaging right. Another thing to consider is that XMPP is one to one private user chats by default, although a multi user chat can be configured without much hassle.
I would suggest Matrix if you prefer the more modern and feature filled style of messaging, and are going to be creating rooms that have several people inside of them. Matrix isn't very well suited for a direct messaging approach. If you are looking for something more robust, mature, and a bit more private and secure, and are also going to be focused mostly on direct messages with individual people, with maybe a multi user chat room for a couple of people you know, you should go with XMPP. In the end, both are very good options (when self hosted), and the choice between the two really depends on your use case and if you prefer mostly directly messaging people, or mostly messaging in a multi person chat. I want to emphasize the mostly, because it is absolutely possible to setup multi user chats on XMPP, and doing direct messaging on Matrix.