Greetings, elmira76!
Thanks for reaching out to the Apple Support Communities! It sounds like you're having an issue getting your Magic Keyboard connected to your iPad Pro. You've done excellent steps so far rebooting the iPad and reconnecting the keyboard. Please check out this article to Update your iPhone, iPad, or iPod touch and be sure the iPad is running the latest software available.
Once you have verified the software on your iPad is up to date, be sure you're following the steps in this article to Set up and use Magic Keyboard for iPad. If the issues are still going on, we would recommend reaching out to Apple directly by checking out this link to Get Support and they will be more than happy to proceed with additional steps.
Have a great day!