url rewriting – Redirect htaccess

I need to help with redirect my page.

For example I have websites https://example.com. I need to move content from https://example.com to https://example.com/blog. That is not problem and I do that with a change home_page URL. That work pretty well. But Now I need to add redirect from old https://example.com to https://xmpl.com.
I want to do with .htaccess but that does not work. Can you help me guys?

Here are some of my attempts of this but both does not work.

RewriteEngine On
RewriteRule https://example.com/ https://xmpl.com/ [L,R=302]


RewriteEngine On
Redirect 302 https://example.com/ https://xmpl.com/

Thank you for your help and time guys.