[This post is part of a larger strategy guide for Civilization 6]
In some sense, I think of science as the "default" victory condition. All things being equal, the game inexorably drives towards someone winning science. It's the only victory condition that can be won with basically no influence from other players. Yes, it's true that you can slow science down with military conquest, but even this will only slow the science victory and not fully end it. And if you are committed to staying within your borders, the only way to stop someone from winning on science is to win with something else first.
Not surprisingly, a science victory is also the slowest way to win. It's possible to sneak a culture or religious victory ludicrously early. Even diplomacy and military victories can be accomplished by the atomic age. But a science win, by definition, can only be accomplished in the future era.
When To Choose Science
There are many civs that obviously benefit from going the science route — Korea is probably the most science oriented, but Maya and Scotland both fit the bill, as do any civs with strong production abilities (Germany, England, etc.).
If you are playing a generic civ, like Rome, you probably want to keep science in your back pocket and go hard for science when it is clear that you cannot win anything else. Generally the process of elimination is pretty easy — you can't win on religion if you don't have one, you can't win on Diplomacy if you don't have a lot of envoys or if you haven't picked up the relevant wonders (Statue of Liberty and Mahabodhi Temple), you can't win on culture if you're too far behind on tourism. You'll know if you can't win on military.
More broadly, you have to do a bit of guesstimating: can you drag the game out long enough to get to the end of the science tree? If yes, go for science.
Crouching Turtle, Hidden Dragon
Science-focused strategies lean hard into the ramp/war dichotomy of the game.
Because science victories take so long, you want to be ramping as hard as possible for as long as possible, uninterrupted. Luckily, it will be hard for people to stop you — if you are meaningfully ahead on the tech tree, it's easy to get advanced units that will increase the health and damage output of your cities/walls without having to invest in a huge army. Since defenders already have an advantage, it's pretty easy to turtle. Just make sure to have enough gold lying around to build a new era unit, and have a few encampments and walls ready to go on your border.
On the flip side, science oriented strategies generally do much better with timing pushes, and have multiple opportunities to execute a timing push throughout the game as they jump from era to era. Taking advantage of these timing pushes is strictly necessary. Because science victories take so long, any science-oriented player will almost inevitably be forced into a war to stop someone else from winning. Most often, this will be a war against the person who has the most culture/is most likely to win on tourism. This means you want to have good awareness of what state your opponents are in, and take advantage of moments where you push for a unit that is an era ahead.
Seize The Means of Production
In some sense, the most important resource for science victories is science. You need science to traverse the tech tree and unlock all the things you need to unlock.
But I'd argue that in the early-to-mid game, the actual most important resource for science victories is production, and you cannot win a science victory without having a strong industrial base. High production cities are going to be able to churn out campuses and their buildings. They will be able to run a lot of Research Grant projects to get more science boosts. And you explicitly need the production to go through the final leg of the science race — the rocket missions and the exoplanet race.
You need to keep up a certain amount of science throughout the game just to remain competitive. I think if you can keep a slight lead in science, and spend most of your excess production towards more production (think: industrial zones, factories, power plants), you're more likely to win than the alternative. And if you end up not being the most likely to win, it's much easier to switch to military mode to stomp everyone else, before going back to ramping.
In an ideal science game, you have Magnus set up in a central city with his Tier 4 promotion that lets him get production bonuses from all nearby cities. And then, in every nearby city, you have a ton of industrial zones with factories and coal plants. I've gotten cities to > 300 production per turn with this set up.

Common Mistakes
Because science victories are the 'default' victory, I think a lot of newcomers to the game think that the way to win is to spam campuses at the expense of everything else. They will settle a city and immediately put down a campus, and will completely neglect culture/coin/production. There's two problems with this.
First, you will inevitably be beaten by someone who spends the early game creating infrastructure, because they will outpace you and build more science later on.
Second, you will put yourself in a really weak state, where the amount of time it takes you to produce military units is way too long. (Once you unlock a unit from a certain era, you cannot build the earlier version of that same unit unless you do not have the right strategic resources. If you want to build melee, manage to unlock infantry, and have enough oil, you have to build infantry. In low production cities, this can be devastating — it may take you 20 turns just to pop out one guy)
More generally, just because it's a science victory does not mean you should abandon everything else. Even culture is useful! There are a bunch of fantastic policy cards that will meaningfully increase your science output, and Nationalism/Mobilization are necessary to stay competitive when turtling. Related: I think people will drop science-boosting policy cards as early as possible. In the early/mid game, this may eke out 1-2 extra science per turn, which is almost definitely not worth it compared to a few extra coin or production.
It is possible to go too far the other way. One mistake I will make is I will spend too much time investing in infrastructure. There are diminishing returns to building that extra industrial zone. If the game is going to end in 20 turns, is it really worth spending 5 turns to build a factory? You could spend that time doing projects or building more science!
More generally, there's an explore/exploit problem here. You need to start building infra, but you need to switch off that at some point to just push science. The best players will have a finely tuned intuition for when to make that switch.
Stopping Science: Win First
This is simply the best way to stop a science victory. Yes, ok, fine, in some sense this is true of every victory type. But for science I mean it!
If you're going up against a science player, they will likely be able to out-military you. They'll get better units first and they'll likely be focused on production so they can get more units than you. Hell, they may even just be able to move around faster than you can, if they have railroads or mountain tunnels or whatever else.
So if you want to go for some other victory type, your number one goal is to win before the science player can reach you.
Reach is an important metric here. As the game goes on, the effective reach of any player increases dramatically. In the early game, you only really can influence your immediate borders, generally by declaring war and stationing units. If you are on the opposite side of the map from another player, you can't really do much against them and vice versa. They can't exactly march warriors all the way through enemy territory just to get to your gates. By the late game, any player can impact any other player. Nukes fly over mountains, lakes, oceans, and land equally.
So you want to try and ensure victory before your opponent can start throwing military at you. Luckily, you can take advantage of the global and exponential scaling properties of both tourism and religion to try and win early. And spies can help here too, with their Disrupt Rocketry special mission.
But what happens if you are right on their border, or within range of their guns, or the spies are all getting captured or killed?
Stopping Science: Rock beats Scissors, Nuke beats Rock
Go to war!
In some sense, it's trivially true that whenever you're losing you can go to war. But this is especially true against the science player, in part because you don't really have other options. You can counter the spread of a religion or offset tourism with culture, but for science you've got no other options.
"But wait", you might say. "Didn't you just explain why going to war against the science player is really hard?"
It is really hard, especially against a player who knows what they are doing. There will be moments of weakness — as the game goes on you should always be looking for opportunities where the science-player pushes science instead of production/military. If you are close enough on science, you can sometimes even outrace your opponent to the next key military unit. This is especially true if you can guarantee that your opponent does not have a strategic resource like niter or oil. And you can further offset the damage differential with great generals, the right policy cards, world congress resolutions, and a sprint towards corps/armies. Put another way, it isn't guaranteed that a player winning on science will always win a fight, and you can definitely stack the deck in your favor if you time it right. But it takes a lot of work.
Luckily, you have one key advantage: nukes.
For the vast majority of the game, civs have a defenders advantage — it requires more and stronger units to attack a city than to defend one. Once nukes come around, the calculus totally changes. You can lob a nuke at an opponent and fully destroy a city without any concurrent cost beyond lost production. The production hit is meaningful, but often well worth the price for the damage inflicted. Remember, science victories take the most turns in the game. By the time the science player gets close to winning, everyone in the game should have nukes. And that means the nukes will be flying hard and fast.
The science player can offset this with nukes of their own, or with anti air. But time spent building a military extends the game, and tourism/religion/diplo victories don't have the same zero-sum behavior — players will advance along other victory paths whether they are at war or not.
Concluding thoughts
I find that most of my larger multiplayer games (5+ human players) end in a science victory. In a game with a bunch of evenly matched players, everyone will constantly be jockeying for position, forming and breaking alliances as needed to prevent any one player from getting too far ahead. But everyone is constantly moving ahead towards science. Inevitably, someone builds the first spaceport, and the end game race is on.