You can use the recovery flash drive created by the HP Recovery Manager to install the OS to the M.2 SSD and use it as your boot drive and then use the original drive as storage.
Opening the notebook and upgrading it will not violate the warranty unless you damage something. You need to be able to return the notebook to its original hardware configuration in the case of any required warranty repair.
Hope this helps! Keep me posted.
Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
Click the “Kudos, Thumbs Up" on the bottom right to say “Thanks” for helping!
Be alert for scammers posting fake support phone numbers and/or email addresses on the community. If you think you have received a fake HP Support message, please report it to us by clicking on "Flag Post".