Ocelots are a neutral mob that you can turn into allies if you know what to feed them. Here's how to tame an ocelot in Minecraft on any platform.
How to Tame an Ocelot in Minecraft 1.19
To gain an ocelot's trust and keep him following you, follow these steps:
Go fishing in a lake or river and collect at least 20 raw fish (raw cod or salmon).
Go to a jungle biome and find an ocelot. Don't get too close or it might run away.