Do city police have jurisdiction outside their city?

I don’t know how jurisdiction overlap works, or if there is a uniform system that applies across the US, or if it varies by city and state.

If a police officer who works in San Francisco (for exampe) saw a crime in San Diego, would he be authorized as a police officer to act as a police officer in response or would he just be another citizen, with a citizens arrest being his only tool? Is it up to a cooperation between the 2 cities on whether the police from city A qualify as police officers in city B, do city police have statewide jurisdiction?

Police outside their jurisdictions-limitations

If you’re a cop in Texas, then you’re a Texas licensed peace officer and you’re a cop anywhere in Texas that you happppen to be.

The thread linked above is good but does not address this follow-up: If a county cop is in another county, can he cite that other’s county’s laws in an arrest (given the unlikely assumption that he even knows the other county’s laws well enough to do so)? Or is he limited to enforcement of state laws?