Sure there is, but you need to understand the variables involved. How expensive is the bike, how safe is he area, how long are you leaving it there for?

At its worst, people get their fancy bikes robbed as they're riding them in big cities like London; at its best, nobody in small villages locks their bikes because they all know each other.

In terms of locks, general advice is to get an angle-grinder resistant U-lock and lock it through the rear frame triangle+wheel+some solid object.

Since a U-lock like that is impossible to defeat with anything that's not a power tool, and you'd need to spend several minutes grinding through it [0] [1], most thieves will not bother. If they cut through whatever the bike is locked to, they still have a bike that's locked to itself.

For extra security you may want to do the same with the front wheel using something like a chain lock. Locking the saddle is also a good idea. Locks with alarms that notify you could be a decent idea too. And/or just get bike insurance.

[0]: https://youtu.be/v_0DB3gBM3Y?t=475

[1]: https://youtu.be/LD32NMCGDF0?t=2440