Go to the channel and right click anywhere on the page and click on “View Source”
From there Command F to find “/channel/”. The channel ID comes right after /channel/ – see graphic:
OR
if you want to have your own button, just put this after the channel URL: “?sub_confirmation=1”
So for example: https://www.youtube.com/channel/UCcioHERtmu0ywFN3TpvyIFg?sub_confirmation=1 would be the link to your button