TL;DR: Always? No. But...
There are three different points in your question. When self-connecting:
- Do you need to go through immigration?
- Do you need a transit visa?
- Can the first airline refuse boarding?
Do you always need to go through immigration?
If you have checked luggage, then in nearly all cases you will have to go through immigration, reclaim your luggage, go through customs, go to departures, check-in/drop your luggage.
There are a few places where there are services which will get your luggage transferred for you between self-connecting flights (Dubai airport, essentially), but it may not work for all flight/airline combinations.
If you don't have checked luggage and you can check-in online or on your mobile and do not need to see a check-in desk (no document check) and the airport layout allows it (sterile transit), then you can usually stay "airside" and not go through immigration.
Note that this very often does not work these days due to additional COVID-related checks which may only happen landside. Some airlines also only do visa checks landside. Other airlines may not have airside transfer desks at all.
Some airlines will not allow (full) mobile/online check-in for flights to certain destinations (often countries like the US or Israel which have additional security checks), or based on your nationality (e.g. Ryanair for non-EU/EEA citizens), etc.
Of course, in the vast majority of cases, this won't work in the US where you nearly always have to go through immigration (there are a few exceptions).
This won't work in some airports where which are not designed for airside transit and everybody is always sent to immigration (e.g. London Stansted or Luton, but there are probably many many more, especially in the smaller airports which are not used as hubs/bases).
In some airports, sterile transit will only be possible if you stay within the same terminal, or only for specific combinations of terminals, so if you need to change terminals it can be a lot more difficult. If you change airports of course, you need to go through immigration. Likewise if you have multiple connections and two are in the same country or immigration zone (e.g. Schengen), you will have to go through immigration to board the "internal"/domestic flight.
Some airports or terminals may not be open 24/7, so if you have an overnight connection, you may be forced to go through immigration and exit the terminal.
In some places and/or for some specific categories of people (based on citizenship, visas...), airside transit may mean you are escorted from the first plane to a holding area where you are held until the next flight to which you are escorted as well, while staff hold onto your passport and/or tickets the whole time.
On the other hand, in some cases even if you can't check-in online or on your mobile there are transfer desks airside where they will be able to deliver boarding passes for your next flight(s). A lot more likely for larger, incumbent airlines at large airports (especially hubs), but it is often quite difficult to find out whether it is possible or not for a specific combination.
So, yes, if the stars are aligned, you may be able to transfer from one flight to another on a different ticket. But there are so many conditions and special cases it's very difficult to give a general rule.
Do you need a transit visa
This is often related to the first question, but, by far, not always:
- You may be able to enter the country without a visa for transit under certain conditions
- On the other hand, in some cases, you may need a transit visa even if you say airside.
Transit without visa often requires you to stay airside (not go through immigration), but in quite a few places there are exceptions, for instance:
- You may not need a visa at all to enter the country in the first place (subject to your citizenship)
- You may be granted a visa on arrival (ditto)
- You may be allowed through immigration if you have an ongoing flight the same day or within 24 or 48 hours or whatever other rule.
- This may depend on your citizenship and/or on any other visas or residency permits you hold (for the country to/from which you are travelling or any country, depending on the case)
- The rules may not be the same at all airports in the same country
The opposite can also happen: even if you stay airside, you need an "airside transit visa" or "airport transit visa" (ATV). Again, this is very specific to combinations of airports and countries of citizenship.
As described above, you may also be escorted, held, and escorted again during your transit.
Again, lots of different rules for lots of different combinations. You need to check a database like Timatic and/or the country's website for your specific combination to find the actual rule which applies in your specific case.
Can the first airline refuse boarding?
You would think that if you go through all the hoops and are sure you can stay airside and don't need a transit visa all is well? Guess again.
When you buy two tickets independently, the airline selling you the first ticket often considers that your final destination is the destination on that ticket. They don't necessarily care if you do have an onward flight to get out of there two hours later. They may, but they don't have to.
So, when they do document checks, they will check what you need (passport, visa, etc.) based on you entering the country where you are self-connecting. Visa required to enter the country and you don't have one? It is more than likely they will refuse boarding.
In some cases it's not even them refusing: they send the data to the destination country, and they say no. And you can't do anything about it.
Yes, it can happen (and I'm pretty sure we have had quite a few examples around here) that they will take into account your onward flight even if it's on a different ticket, but they have no obligation to. Even if you show them the rules for transit in Timatic or on the government's website or whatever which you think proves your point: they don't have to care.
In your case
You have a Belgian passport. That means you are allowed to enter Qatar for short stays (well beyond the duration of your transit) without a visa. So you will be allowed to board.
Whether you can or cannot do the transit airside in you specific case I have no idea. But worst case, you go through immigration, to departures, check-in, and back. Will just take a bit longer.
Which brings us to...
Are there any other consequences to self-connecting?
Beyond airside transfer and visas, there are other consequences:
Currently, you have to take into account the additional Covid rules such as vaccination requirements, tests (and how far in advance they can be taken), blacklists, quarantines, etc. Each of the two tickets may be considered independently by airlines or local authorities. So if you need to have a test "taken less than 24 hours" to enter your final destination for instance, it will probably need to be taken at the transit airport.
Time. A "real" connection on the same ticket can be extremely short, and is defined as a "minimum connection time" (MCT), which can be as short as 30 minutes in some cases (varies depending on airport, airlines, type of flight -- international or domestic, etc.).
When self-connecting, it is very likely it will take longer, unless the stars and the Moon and the Sun are aligned. And if you need to go through immigration, check-in and security, it can take a lot longer in some circumstances (especially these days).
If you need to do a check-in at a desk (or even at a transfer desk) at the connection airport, you have to do it before the check-in deadline. Again, this varies a lot, from 15 minutes to well over an hour, but 45-60 minutes for international flights at large airports is common. If you are not in time, you will be considered a no-show, and your ticket will most likely be cancelled (unless it's flexible and allows for that), possibly along with all further flights on that ticket!
Time. If your incoming flight is late and you miss your onward flight (or even just the check-in deadline), the second airline will not care. You are late, that's it, you're a no show.
Same thing if there is any issue with immigration, customs, luggage (if you have any).
In all cases where you miss your onward flight, you will have to find, book an pay for a new one on the spot. At last-minute prices. Possibly days later if the route has few flights and it's a busy period (like, say, right now). All hotels and meals and all other costs in the meantime are on you.
Cancellations. If one flight is cancelled, you will usually be able to get a refund or rebooking for all the flights on the same ticket. Not for any of the flights on the other ticket. In ever-changing COVID rules times, this is even more important than usually.
Schedule changes. Same thing. If one of the flights sees its schedule changed so that connections to other flights on the same ticket no longer work, the airline will (or at least should) work with you to find a solution. Self-connecting? They don't care if suddenly your incoming flight arrives after your onward flight.
Note that there's a site out there which specialises in selling self-connections, and throws in a "guarantee" that they will sort things out for you if anything wrong happens. That guarantee is not worth the electrons it is written with, act as if it didn't exist.