Don't contest the Ottomans in the early game through war when you share a land border with them. Their limitless reserve of manpower and their superior units means that victory is unlikely, and if you are capable of capturing victory - it's one where you could've better spent your manpower taking over the Vienna, Ragusan and Venetian trade nodes.
Look at this chart I made, showing the units for east tech and anatolia tech from 5-28. Green is anatolia, red is east. Now this is all pretty meaningless on its own so let me be helpful and shit by CONTEXTUALIZING DATA WITH INTENSE FURY.
From the early 1444 start of the game, the East tech people are rectally savaged by the superiority of the Ottoman Empire. Unfortunately, this includes the noble magyar savages that reside within the Carpathian walled plains known as HUNGRY. For one must only ever shout Hungary to the point where it is indistinguishable from hunger. Helps get in the mindset of a magyar commander eager to reverse Hapsburg all over Europe.
Ottomans and Hungary both start at mil tech 3, however the Ottomans start with a hard-coded ruler who is very young and with very high stats, so they will likely begin to rule ahead in the early game. Even if they didn't, their inexhaustible wells of manpower, their high morale and discipline would make an early attempt at invading the Ottomans highly inadvisable. If you are invaded by the Ottomans you are being punished by God for not securing an alliance with a big country.
Countries like the Venetians, Genoese and even the Knights of Rhodes can afford to early war the Ottomans by trolling them with ridiculously oversized fleets, because at sea the Ottoman armies count for shit. But you are noble magyar, you possess a large land border and a small navy. Early war is almost suicide. Oh yeah, and did I mention the Ottoman leader (who will have more mil points than you, guaranteed) also gets a decision to boost infantry combat for 20 years by 10%? And that the Ottomans start with +5% discipline, and that any difference in mil-tech will make winning a single battle impossible? Yeah, just don't think about it. If you can diplomatically slow down the Ottomans without risking battle, go for it. If not, focus on expanding Hungary's power base.
So at mil tech 9 we see the Ottomans make some real headway by unlocking the Janissary. The Janissary is scary, he IS NOT YOUR FRIEND. Unless you are kebab in which case Janissary IS YOUR FRIEND. The humble backbone of the Ottoman army, what makes him really scary is that he has an offensive fire pip and his offensive morale capabilities are superior to your equivalent, the humble pikeman. This means that effectively for 90 tech years from the start of the game fighting the Ottomans on land is suicide or at best, more damaging to you than them. In the fire phase all of their infantry will be doing damage to your lines and worst of all, causing morale damage - coupled with the Ottomans' high morale, any Hungarian combat line will struggle to not break before the shock phase has begun, and will break when the shock phase has begun. As the Ottomans will always outnumber the Hungarians in this period, the Ottomans will unquestionably dominate any battles, and as early game battles contribute significantly to warscore, will result in Hungary getting partitioned fairly soon. The story is much the same for cavalry, with Eastern Cavalry being certainly better than their infantry (and you should love your cavalry as Hungary), but again, for the first 100 years from the start of the campaign your cavalry will still be inferior to the Ottomans' and not enough to maintain parity with their Janissaries, so even if you go 50/50 inf cav you won't beat the Ottomans.
At mil tech 14-15 Hungary opens a window to a wonderful world of opportunity. At this point in the game, Hungary's infantry have fire pips, and most importantly have the morale and fire defence needed to weather the Ottoman infantry's gun-line. This means that in the fire phase the Hungarian infantry will not break, soaking up the fire to allow the most glorious Eastern Hussar to swoop in the shock phase and fuck all their shit up - with the Ottoman infantry backbone
having terrible shock defence. Furthermore, up until now the Ottomans have had an advantage in troops with better morale and better discipline. Yet by this point you'll be around admin 14, unlocking 4 idea groups and you will definitely have unlocked your national idea: FOUND THE BLACK LEGION. This metal sounding group of fuckers are Hungary's professional standing army, and they give your dudes +5% discipline, which allows your dudes to match the Ottoman's starting +5% discipline. If you pick your national ideas well, you could even exceed the Ottomans in terms of unit bonuses, but more on that later.
At mil tech 19 the Ottoman army reforms its infantry and cavalry and they become more competitive, but honestly you can still keep attacking them if you think the situation is advantageous. Just expect the fight to be about even, as the Ottoman reformed Janissaries and Cavalry are more able to resist the shock phase of your Eastern Hussars (but are still inferior to your Saxon Infantry. Thus if you are already at mil tech 19, and they are at mil tech 19, go for it. If you are at 18 and they 19, do not start battle until you get mil tech 19). From this point onwards time is clearly on your side, because you can get to mil tech 22 and unlock THE GLORY OF THE WINGED HUSSAR.
In the fire phase the winged hussar looks cool and doesn't do anything, so you want your Saxon infantry to look steely and take all the hits until the shock phase arrives. At that point CAVALRY LANCES GUIDED BY GOD annihilate anything in their path down to the atomic level. Mil tech 22 is a magical time. Be sure to have fun in that time. You might want to wait til mil tech 23 to reform your infantry to better units but if you're spamming WINGED HUSSARS it doesn't really matter that much.
Then of course by the time you start getting to late game units you can start beefing up on infantry and the Ottomans shouldn't really be able to stop you from simply sweeping them away. East tech infantry blobs and Cossack nomad trolls will outperform Ottomans and make a mockery of their endless wells of manpower by killing their endless wells of manpower to death.
The 1337 Magyar strategy:
From mil tech 3 to mil tech 13, your job as Hungary is simple. Secure alliances with countries that have really fucking big armies. Doesn't matter if it's a horde of Russian peasants armed with spoons and the realities of serfdom, if there's lots of them the Ottomans will think twice about attacking you and will instead attack diplomatically isolated Persians or Ethiopians. The Persians or Ethiopians despite their inferior armies will cause serious delays in the Ottomans by virtue of all their provinces being full of fuck tons of mountains. Secondly, you are to maintain mil tech parity with the Ottoman Empire at all times. This is just in case you actually end up in battle with the Ottomans - in the early game, with an allied blob of peasants, it is still possible to win enough battles to trigger a white peace. If you are a single mil tech behind the Ottomans however, the difference in the tactics value will mean you will lose no matter what. If you end up getting invaded by the Ottomans between tech 3 to tech 13, then you should avoid battle wherever possible with any meaningful Ottoman army, striking their isolated units and letting the Ottomans siege you down. Do not even move a single unit into their territory. Accept that you've lost the war, but you need to make the Ottomans lose time, and if the Ottomans take much land then the resulting truce will be even longer.
Always remember too:
Your provinces are not very good. Losing some if it means surviving to retake them later is good. Historically the Hungarian-Ottoman border was very fluid, do not forget this.
During all of this time you need not be idle, and you really shouldn't be idle, though sitting comfy at home and developing your provinces is a legit strategy. If you don't want to go that route, invading Venice is a good idea. Ally with Austria and invade Venice, being sure to be the one who starts the war and the one who ultimately takes over the most valuable city of Venice and their bordering province in Dalmatia. Leave Ragusa alone, it's not worth waging war with the Ottomans over it. Once you've taken over Venice, move your trade capital to Venice and use your merchants to steer your Hungarian goods into it. If you have any more merchants it's usually best to use caravan power to bring in Polish and Ukrainian goods rather than expand into Alexandria, as doing so requires building a navy which diverts precious funds which could be spent on fortresses, province upgrades and cavalry. Whether you keep the Austrian alliance when you've conquered Venice is up to you, if you can replace them with another ally that's great as it allows you to connect your Italian holdings by land to Hungary, if not it's no big deal.
During all of this time I recommend picking in order: Innovative ideas, Economic ideas, Aristocratic ideas & Quality ideas.
Innovative at the start will make all your tech costs cheaper, Economic will make you richer, lower all your admin tech costs further (it's worth mentioning that all ideas reduce the tech cost in their respective field, so adm ideas reduce adm tech cost, mil ideas reduce mil tech costs). Aristocratic reduces mil tech costs, reduces the cost of your cavalry and increases your cavalry combat ability - it's a perfect match. Also, you don't want to miss out on the early mil tech morale, which is why aristocratic comes after innovative and economic. Never pick a mil idea group first unless it's maritime and you're Knights or Hormuz. Even then you probably shouldn't. Anyways I digress, quality comes fourth - once more increasing cavalry combat ability and also increasing discipline. By this point Hungary's national ideas will have neutralize Ottoman idea discipline and cavalry combat ability (but not their infantry, and also not the discipline bonuses they get for bolstering the Janissary corps, and certainly not enough to threaten Ottoman manpower/economy). By this point, Hungary is fairly safe and can start playing regional hegemon with the Italians, Germans and Eastern Europeans. Leave the French alone though. But yeah no, at this point with all these ideas you've got
+40% cavalry combat ability. If you pick espionage (espionage is pretty terrible, but in this case it may be worth considering) that opens up the noble loyalty act, a policy which will allow you to jump that +40% to
+60% cavalry combat ability!!! That, and you can cause the Ottomans some headaches by sowing discord with spies and shit. But eh... Covert stuff is more a nuisance than a threat in this game.
Anyways, your secondary goal in this time should be keeping the Ottomans peacefully at bay as the strong-looking bulwark as Christendom that doesn't really war with the Ottomans. For this reason it's best to pick an ally like Austria or France who don't border the Ottomans and won't drag you into a war you can't survive or thrive in. I say this is a secondary goal because it's not that important really. You may be worried that by allowing the Ottomans to expand you'll have a greater problem in future, which is true, but there's also the law of diminishing returns at play. The Ottomans conquering their way to ancient Babylon and Aksum doesn't help them nearly as much as you conquering the Vienna and Venice trade nodes. And if you get more, if you even become Emperor? Oh dear, how moisturizing. If you don't become Emperor? Then the change that should occur will still be the same: You will have become the deadly Magyar butterfly, hatching from its cocoon. The Ottomans on the other hand will still be dangerous to you, yet despite becoming more powerful,
are less dangerous to you.At mil-tech 14-15, your cavalry guided by GOD should be rolling around Europe expanding in all directions, generally just scaring everyone who looks at you funny. You must remind them of glorious magyar heritage like you are playing CK2. Invade everything valuable that is weaker or equal in strength to you, leaving yourself only constrained by imagination and aggressive expansion. If you do decide to wage war upon the Ottomans, have two armies at the ready. One will accept allied armies to attach (this is important so allies don't retardedly leroy jenkins into Ottoman gunfire), the other contains your unlimited Hussar hordes. Allow the Ottomans to invade and lay siege to your mountain fortresses, then attack the Ottoman armies - with a mountain penalty, they will struggle to be victorious even with their sizeable combat bonuses and commanders. Keep doing this until the Ottomans start suffering from clinical depression and peace out favourably, don't worry if you can't take over their Balkan or Greece land, what's more important is that you drain their treasury and keep driving up inflation and making them take loans. The goal is to ruin their economy. Reminder: A bankrupt nation, no matter how good their ideas, is one that cannot defend itself at all. I'm serious - their morale is so low that if you sent one drunk leper to fight their army, their army runs away.
By the time you start reaching mil tech 23, the picture should be very sexy for a liberation of Christendom with your flurry of roided up horses. This is because the Ottoman rulers who were intelligent as fuck will be pretty mediocre on average by now, which will be the same as your dudes. But by picking innovative ideas you should be picking up an edge, possibly even arriving at mil techs early and putting the Ottomans at a severe military disadvantage before you factor in ideas. If the Ottomans are hit by the Janissary decadence disaster, even better - they'll be at a
25% mil tech disadvantage. Also, you better have been keeping all institutions up fam. Always remember if a nasty institution like colonialism is hard to come by you can just develop one province until it has that institution. Doing this is usually always worth the monarch points, and because you have economic ideas you'll save a lot of points. Before you do this however, make sure you go to the states edict UI in the province overview and select the development edict, this will save you a further 10% on monarch points.
Honestly at this point you can take whatever ideas you want. Religious and humanists are not really needed since Hungary has a special idea which gives no negative bonuses for religious intolerance, so they can conquer heretic and heathen provinces with impunity and pretty much ignore much of the reformation in their own country. Whether they remain Catholic or convert to one of the other Christian sects doesn't really make a difference, since they're all pretty good fits for Hungary. If you somehow manage to convert to Tengri, good job, you made Hungarian cavalry even more powerful and Tengri is pleased. Religious is nice though in that it'll allow you to better keep religious unity up and give you a very good CB to attack anyone of a different religion to you, and this shouldn't necessarily be ignored. Humanist reduces idea costs and aggressive expansion, and can be really powerful to reducing AE with diplomatic, influence and espionage ideas. Once you've started pushing into the Constantinople trade node the Ottoman Empire is pretty much done for. Until you're strong enough to do so however, it's pretty easy from your trade node of Venice to just send loads of light ships to protect trade in Constantinople, diverting the great wealth the Ottomans have brought to Constantinople courteously into your coffers.
If you're still threatened by the Ottomans by the time you get to Winged Hussars, then your time to break their back is at hand. If you're the hegemon of the Eastern world, then do as you will. Hungary is in a prime position to expand anywhere it wants, into the Russian Empire, into East Africa, into Persia and then India - its cavalry will be a fearsome shock to all.
*EDIT
On a last note, diplomatically blocking the Ottomans in Europe and making them attack Persia may seem horrifying at first, but it's the best case scenario. Sure the Ottomans gain lots of base tax and bring in lots of trade revenue from silk to Constantinople, but that also brings silk money to Venice :]
Moreover, Persia generates some really pretty rebel stacks. Really, really pretty rebel stacks. All the better if the state of Persia itself survives Persia proper being annexed. OH BOY THE REBEL STACKS NEVER END