We first need to break up your question. There are protocols implemented in operating systems (low-level protos) and those implemented in applications (high-level protos).
What makes early high-level protos so interesting, like Usenet and SNMP, is that they are not dependent on low-level protocols. Basically they just need the operating system to provide a mechanism for streaming data to come to/from the machine they want to speak to. You can see that Usenet's protocol's , UUCP, code can handle TCP or serial connections.
My question is, when I'm developing a software, can I decide which application protocol will it work?
Yes, you ask the OS for your low-level protocol and you then implement your high level protocol in you application. You can also layer protocols ontop of one another.
the TOR browser, I read that .onion sites use a different protocol than HTTP, how is this possible?
While not a TOR expert, general proxy protocols like SOCKS, use TCP at a low level to connect to their first proxy and then using higher level protocols encrypt HTTP requests so they bounce around several proxies.
this is a very high level answer, you can absolutely implement a low-level protocol in an application. I am just speaking to the most common examples