Transmission problems

truck transmision slips in any gear but first and second

Sorry but you most likely need a new transmission. But pull the dipstick out and check the fluid level while the engine is hot. If it is low, add the correct fluid for your car (if you don’t know and your manual doesn’t tell you, look it up online).
When you first pull the dipstick, if the fluid is at the correct level, smell the oil. If it has a burnt smell, you are likely in need of a new transmission. You can try replacing the fluid and replacing the screen, but the odds are against you.

Manual or automatic?
When clutches wear out they’ll typically begin to slip in the higher gears first. As a matter of fact the best way to test a clutch is to get in high gear and floor the pedal. If it slips, it’s shot.