Do not cook the fish. Ocelots are only attracted by raw fish.

In the newest version of Minecraft, taming an ocelot no longer turns it into a cat that you can keep as a pet. However, you can find stray cats in villages that can be tamed and kept as a pet. Cats can be tamed using these same steps. [1] X Research source

The ocelot will possibly come to you when you are holding a raw fish. Do not be threatening in any way. Be in an area that allows for plenty of escape for the ocelot. Your character must be situated somewhere that has a 7x7 minimum horizontal block area. This will allow the ocelot to feel safe rather than trapped. Taming will not take place if hostile mobs are attacking at the same time. And never have chickens or other animals around.

Walk at normal speed if you need to move nearer to keep apace with the ocelot, but don’t get too close while moving. Only use walking to get nearer, then cease moving. Never look directly at an ocelot when attempting to tame it. This means keeping the crosshairs off it.

Stand still if possible. This is the best way to attract the ocelot. If you want to, try sneaking––this might work without disturbing the ocelot. (Try holding sneak, while the mouse sensitivity is set to yawn. )

Wait for the ocelot to stare at your character and approach timidly. If the conditions are right, the ocelot will slowly walk towards you.

Use quick repeated right-clicks without jerking the camera or moving. Any movement can scare away the ocelot before it is tamed

A tamed ocelot will not flee the player. A tamed cat ceases to be afraid of humans. It will meow and purr quite often. It will follow you around and sit on demand (simply right-click or press the left trigger button). Cats will sit on everything, including chests, which can be a nuisance as the chest won’t open until the cat gets off it! Both cats and ocelots can ward off creepers. Taming two ocelots or cats in close proximity will cause them to breed.