You can buy D-locks complete with a bracket to fit onto the bike that you clip the lock into. The brackets come in various sizes, I have an Abus D-lock with a bracket that I’ve secured to one of the seat stays. My sister has another make, not sure which, with a bracket secured to the down tube...