You asked

Which of the canon eos 4000d or nikon d3500 works with the lenses I already have?

Here is what the site says about that.

From Canon EOS 4000D: Canon EOS 4000D: A DSLR by Canon with a 18-megapixel APS-C (Canon) sensor, announced in 2018. Canon's most basic DSLR, sold as the Rebel T100 in North America. Specs - Maker: Canon - Mount: Canon EF - Sensor: APS-C (Canon), 22.3 x 14.9mm, crop factor 1.6 - Resolution: 18 megapixels - Stabilisation: none in the body; use stabilised lenses for slow shutter speeds - Announced: 2018 - Type: DSLR Focal lengths on it ...

From Nikon D3500: Nikon D3500: A DSLR by Nikon with a 24.2-megapixel APS-C sensor, announced in 2018. Nikon's last entry DSLR: small, simple and long on battery life. Specs - Maker: Nikon - Mount: Nikon F - Sensor: APS-C, 23.5 x 15.6mm, crop factor 1.5 - Resolution: 24.2 megapixels - Stabilisation: none in the body; use stabilised lenses for slow shutter speeds - Announced: 2018 - Type: DSLR Price in France - Used: 294–314 € ...

Quoted from this site's pages.

From these pages

This answer is for the question above. Each answer is written for the exact question in its address, so a question with its details in it (a budget, what you shoot, what you already have) gets an answer about those details. An answer draws on all 15 pages of the guide and its catalogue of 320 cameras and 1050 lenses. Another question gets its own answer at its own address, as words after /ask/. Or fill in your own: /ask/which-camera-for-{what-you-shoot}-under-{budget}-euros or /ask/which-lens-for-{what-you-shoot}-on-{your-camera}.