It works simillarly to an IRC. You have a server, that server can have channels, I think it can even do voice. But, unlike IRC, you can also use your server to talk to people on other servers, similar to how Fediverse works - if I have a server hosted on myserver.com, and someone else has a public room on server otherserver.com, I can either join the room@otherserver.com or message person@otherserver.com, all from my account on myserver.com.
And bridges are basically just bots that run on your own server, and by scraping websites/using API of the service your bridging they create a private room i.e Messenger@myserver.com, with subrooms per chat, and the bot then sends every message it recieves signed into your messenger account to the room, and vice versa - anything you send there will it forward to the real messenger, basically allowing you to chat with people on messenger through your matrix server. Which solves the problem of “Each of my friend is using different messaging service, can I have them all in one app? (The app being Matrix client)”.
I usually just look into the docs, for most of the more basic things, search engine will find you the related function, and the docs usually have usage examples.
Also, learning to work with and read a documentation will be one of the best skills you can acquire as a programmer. I was so glad I was used to docs, because when I started to work with libraries that are under NDA (porting games on consoles, most prominently PS5), where the only resource you have are docs and internal forums without any kind of tutorials, being able to figure out what you need from docs is really nice skill to have.
I have tried using AI for non NDA programming questions, and usually I’ve ran into an issue that it simply just halucinates even on basic questions. For example, I was trying to figure out how to prevent Quest from sleeping, so we can run long-running automated tests, and all of the solutions were adb parameters that do not exist. Unless it’s something super basic, AI will probably just send to you the wrong direction.