What's the best opening to take white's ability to castle?

The OP asks a good question which illustrates, if he will forgive me, something that improving players fall into the trap of. Indeed, I believe we all do, to different degrees. The false idea is that we can impose our will on the board irrespective of our opponents moves.
The motif of disallowing castling is one of numerous ideas that present themselves during a games. This analogy comes to mind:
Suppose I go for a walk one day and feeling quite well and generally cognisant, I find an high denomination bank note along the street. Which is good. So the next day I'm walking along looking for banknotes, when I miss Mr Jones walking on the other side of the street who borrowed my lawn mower months ago and I don't get the opportunity to tackle him over the issue. It so happened I no longer need the mower and would sell it - in fact only earlier I missed out on this possibility from someone who said he's buy it off me.
Becoming aware of my Jone Blunder, but remembering the banknote victory I go for another walk the day after, I notice Jones and another note in the road, but letting my attention to stray from other more pressing factors, I summarily get knocked over by a car. In the post mortem with God he advises me I shouldn't have lived a dogma based life but have maintained a general awareness and not been constrained by fixed ideas of what to expect.
'In the fields of observation chance favours only the prepared mind - Pascal'

The OP asks a good question which illustrates, if he will forgive me, something that improving players fall into the trap of. Indeed, I believe we all do, to different degrees. The false idea is that we can impose our will on the board irrespective of our opponents moves.
The motif of disallowing castling is one of numerous ideas that present themselves during a games. This analogy comes to mind:
Suppose I go for a walk one day and feeling quite well and generally cognisant, I find an high denomination bank note along the street. Which is good. So the next day I'm walking along looking for banknotes, when I miss Mr Jones walking on the other side of the street who borrowed my lawn mower months ago and I don't get the opportunity to tackle him over the issue. It so happened I no longer need the mower and would sell it - in fact only earlier I missed out on this possibility from someone who said he's buy it off me.
Becoming aware of my Jone Blunder, but remembering the banknote victory I go for another walk the day after, I notice Jones and another note in the road, but letting my attention to stray from other more pressing factors, I summarily get knocked over by a car. In the post mortem with God he advises me I shouldn't have lived a dogma based life but have maintained a general awareness and not been constrained by fixed ideas of what to expect.
'In the fields of observation chance favours only the prepared mind - Pascal'
I get your point, and agree with you – my question is of course to be treated when the situation / scenario becomes available or possible. And obviously, to a certain degree (depending on how good your position ist) you can control the game. That's already the case in the opening, even if White has the advantage of starting first. But like I said, I was looking for let's say maybe "well known" tactics in the opening where black could take white's ability to castle, which of course does not mean that it will and that it can be possible all the time.
Like you said in your quote: 'In the fields of observation chance favours only the prepared mind – Pascal'
@tmkroll Interesting – haven't really seen many people playing this opening yet. But I'm still at a level where most people don't really know any openings (including myself).
@JSLigon Yup, this one I'm aware of. Sometimes worth it, but I only do this if most of my other pieces are already well developed and my opponent hasn't castled yet. In this case here it's a waste of points in my opinion.

The OP asks a good question which illustrates, if he will forgive me, something that improving players fall into the trap of. Indeed, I believe we all do, to different degrees. The false idea is that we can impose our will on the board irrespective of our opponents moves.
The motif of disallowing castling is one of numerous ideas that present themselves during a games. This analogy comes to mind:
Suppose I go for a walk one day and feeling quite well and generally cognisant, I find an high denomination bank note along the street. Which is good. So the next day I'm walking along looking for banknotes, when I miss Mr Jones walking on the other side of the street who borrowed my lawn mower months ago and I don't get the opportunity to tackle him over the issue. It so happened I no longer need the mower and would sell it - in fact only earlier I missed out on this possibility from someone who said he's buy it off me.
Becoming aware of my Jone Blunder, but remembering the banknote victory I go for another walk the day after, I notice Jones and another note in the road, but letting my attention to stray from other more pressing factors, I summarily get knocked over by a car. In the post mortem with God he advises me I shouldn't have lived a dogma based life but have maintained a general awareness and not been constrained by fixed ideas of what to expect.
'In the fields of observation chance favours only the prepared mind - Pascal'
I think that makes sense but I'm too dense to make it out. Is exchanging queens to prevent a castle a good idea or not? Thanks.

terrible. Giving up the bishop pair....this is a better alternative!
A real opening is the Cochrane Gambite.

terrible. Giving up the bishop pair....this is a better alternative!
A real opening is the Cochrane Gambite.
I tried this one time. My opponent played 3. Nxe4. I ended up getting creamed. What did I do wrong?
In some variations of the Ba6 Queen's Indian you can capture the bishop on f1 and White has to take back with the king.... not forced though.
But when queens are traded it's often to your advantage NOT to castle -- the king is generally not in so much danger, and it's better placed for the endgame
Let's see, where to start... it seems you may be asking about something like Black misplaying the Scotch Game and wondering how you can do the same thing as Black.
If this is the sort thing you want to do with the Black pieces, not only can you not do it... you shouldn't even be able to do it with the White pieces if Black plays opening right.
There are lines where Black lets you do this on purpose Rat Defense, Berlin Defense, and sometimes it's a good idea and sometimes it's not, but it's often just a game. Black can't castle and that's a feature but the position ends up more or less even.
There's also stuff like the fork trick where one variation is to take on f7 or f2 and stop the other player castling and it's practically winning for the other player.
The first opening I posted is the old mainline of the Cunningham Variation of the King's Gambit. It's not really very good, but it's not bad. The "modern" version of the line is just to play 4... Nf6 and forget the whole stopping White from castling thing. It's thought not to be worth wasting so many moves to do, but the line is probably about even. I think some people even still prefer Black, who is up a pawn after all. There are better ways to fight the King's Gambit, but that's the first line I thought of that is normal theory where Black goes out his/her way to stop White from castling... also there's the old mainline of the Bishop's Gambit, come to think of it, which again dogmatic players say is not best for Black but some strong players on this forum have said there is no reason and it not a bad plan.
Some of these players seem to be posting jokes where White sacrifices a piece on f7 to prevent Black castling and loses the game... however the Cochrane Gambit is not one of those; it is a real opening, though some people think it's not sound. It's been played by modern super GMs from time to time. #6 seems to be bad as well. It might actually be good for White if Black takes the Knight but Black should be winning with Qe7. In general Black plays d6 earlier (as in the Cochrane) anyway but here is a more serious article on 3... Nxe4 which is generally thought to be a mistake: http://www.kenilworthchessclub.org/games/java/summer05/gadgil-mazzillo.htm .
Finally Turk's comment makes me think of the Benko Gambit. I don't play it so I don't really know bit but I seem to remember Black can trade Bishops on f1 and stop White from castling in some lines.
I forgot about the bad pseudo pawn win in the exchange Spanish... you might actually run into this. It's sort of the reverse of my first line this morning and probably closer to what you were actually asking about. White shouldn't allow this, but if they do Black should trade queens and prevent castling in response.

I'd like to give a counter example , so to speak, where black has moved his king, but is usually regarded as better because of the d4 square:
The moves were 1d4 d6 2c4 e5 3Qxd8 Kxd8

Ziggy-Zugzwang's posts are completely on point. If white plays well and doesn't want to lose the ability to castle, then you cannot make him lose that ability. To clarify, there is a lot of openings for white where his king will be very safe, and, unless you launch some kind of desperate attack early on or make a weird piece sacrifice, you won't be able to trap his king at the center.
You should view taking your opponent's ability to castle away as a potential resource arising in some of the games, not as a core of your game strategy. In some positions it is even a bad idea to take your opponent's queen with yours, because it gives him better chances to get a draw in the endgame, whilst before you had a good positional advantage and could play for victory.

If my opponent gives me the opportunity to keep his king in the middle, I'll do it. But I don't know if one opening is more likely to make it possible.
In the following game, I had White and saw on moves 10 and 11 I could keep my opponent's king in the center and make it harder for him to coordinate pieces by putting my Bishop on an outpost at d6, kind of like a "pawn nail." But I simply took advantage of the opportunity when it was presented to me: I didn't play the Classical Steinitz Variation against the French Defense expecting it:

terrible. Giving up the bishop pair....this is a better alternative!
A real opening is the Cochrane Gambite.
I tried this one time. My opponent played 3. Nxe4. I ended up getting creamed. What did I do wrong?
I don t know you can send the game?
With black I play the Petrov. Never I have so much fair for the Cochrane Gambite
I think it is a bit dubious. But on our level it is playable.
Oh and 3...Nxe4? is not a good move. Because white can play 4.Qe2! the first Petrov trap you learn! the 3....d6! is nesseciary and then the 4.Nxf7 is possible or of course 4.Nf3 back and then 4....Nxe4 5.d4 d5 etc. or 5.Nc3 Nxc3 wich is now populair.
When I play a basic opening with white, sometimes, when the pawns and knights have been exchanged, my queen will directly face black's queen. So I will exchange queens – black will have to take my queen with their king – and black therefore loses their ability to castle. That doesn't always work obviously (sometimes a knight on f6 can take my queen for example) but I've played a lot of matches now where I was able to do that. I really like it. If possible, I will also castle queenside and automatically put black into check with my rook on d1.
In the last week or so, since I started practicing this, I noticed that taking my opponent's ability to castle brings me a quite noticeable advantage.
What I'm wondering now is if there's something similar for black. A fast / quick opening or a tactic or constellation in the early game where you can take white's ability to castle.