Glad it worked for you ShowMe
I wouldn`t leave it at that though and suggest you do a bit of remedial work and create a recovery USB device in case the problem happens again, some steps below for you, placed in the shortest order so that they are easier to follow;
Check that Windows 10 is fully up to date and if any have failed to install.
Check that your battery is charging, if at 100%, disconnect the AC adaptor, use the notebook while keeping a check on the amount of charge in the battery and make a note of how quick the battery loses its charge, once below 50%, reconnect the AC adaptor, check that the battery charges up to 100% again then disconnect the AC adaptor, see my canned info below**
Create a recovery USB thumb drive using Macrium Reflect (free) see guide courtesy of Essexboy here (when you have time download a Windows 10 ISO from Microsoft).
** Some but not all of the below is relevant to your question but the information may help others who read your topic looking for guidance themselves.
To prolong the life expectancy of a notebook battery it should be allowed to run out of charge once in a while and then be fully recharged again, this is sometimes called exercising the battery.
It is not a good idea to use a notebook with both the battery and AC adapter/charger in place as it will shorten the life of the battery, this because the battery becomes reliant on being fully charged all of the time and so when the AC adapter/charger is removed the battery will quickly lose it`s charge, not all batteries do have but what many older ones do have is a memory cell (EEPROM) which stores the charge amount/content rating and this is often what becomes affected by continuous charging from the AC adapter/charger, typical symptoms may include not charging at all and only charging to a certain percentage and no further.
To exercise a removable notebook battery you should charge the battery to 100% when you are not going to be using the notebook away from a wall socket power outlet for an extended period of time, turn off and remove the AC adapter/charger and the battery, store the battery in a safe place, reconnect and use the AC adapter to power the notebook while you have access to a mains power socket, every once in a while (1 to 2 months) remove the AC adapter, replace the battery, use the notebook until the battery charge is depleted, connect the AC adapter/charger, charge the battery up to 100% and then repeat the very same steps as above.
Notebook and Netbook users who`s computers have integrated batteries should follow any guidelines provided by the manufacturer regarding best power management and settings but would benefit from once in a while allowing the battery to become empty of all charge by following the above steps, then fully charging the battery back up to 100% and then reverting back to the recommended power management steps that the manufacturer has suggested, these steps may include charging the battery up to 100% and then removing the AC adapter/charger, using the computer until the battery charge depletion level reaches the pre-set minimum allowed, reconnect the AC adapter/charger and then fully charge the battery up to 100% again and repeat the process.
Please note that the above will not help with a battery that has been damaged by being continuously connected to mains power or has reached it`s maximum charge amount limit/life expectancy.
If your notebook battery will not fully charge it suggests that it may be damaged or has been charged the maximum amount of times and so you should not allow it to lose all charge until you have a suitable replacement battery, this because a damaged or naturally expired battery may not begin to charge at all.
Some further information regarding how to prolong the life of a Notebook etc battery which includes calibrating it here