The search term you are using reveals a lot about what you are looking for. Let's break it down.
Trainers function by injecting code into specific memory addresses within your computer's RAM while rome2.exe is running. If your repack utilizes a slightly older or newer build number, those memory addresses shift. Attempting to activate a v2.4.0 trainer on an incompatible build will instantly crash your campaign map. Core Trainer Features & Hotkeys
Open the trainer executable with administrative privileges (Right-click > "Run as Administrator").
Make forging alliances and vassalizing factions much easier.
For those looking to avoid external software, certain "cheat mods" available through the Steam Workshop can provide similar benefits like unending income or instant building times without needing a separate trainer executable.