You cannot officially play Mario Kart 64 on a Wii.
Why
No N64 Backward Compatibility: Wii only plays GameCube discs (via hardware) and Wii discs. The N64 cartridge slot and CPU architecture are absent
No Virtual Console Release: Nintendo never released Mario Kart 64 on the Wii Shop Channel (closed 2019). Other N64 titles (Ocarina of Time, Mario 64) were released, but not MK64
How to Actually Play It
Original Hardware: N64 console + cartridge + CRT or HDMI mod (UltraHDMI, N64Digital)
Wii U Virtual Console:Mario Kart 64is on Wii U eShop (playable on Wii U, not Wii)
Nintendo Switch Online + Expansion Pack: Official emulated version with online multiplayer
PC/Phone Emulation: Project64, Mupen64Plus, RetroArch (legal with own ROM dump)
Wii Alternatives
Mario Kart Wii: The native Wii entry—bikes, tricks, 12-player online (defunct), huge track roster
Super Mario Kart (SNES): Available on Wii Virtual Console (Wii Shop closed, but pre-installed on some Wii U transfers)