Depends on the bike, Most brands established and new will in an attempt to create unique selling points use custom firmware run on generic control systems and employ brand protections such as battery communication which is sales speak for limiting your replacement battery options to the original seller if available..
Battery communications are not adding any value, the current voltage of the battery at any given time is the best indicator of remaining charge available something most pick up in working out in their heads at a glance after a week or two. so avoid any bike offering this special feature..
double check that only 2 x power leads connect to the battery to be safe..
without the complication of unnecessary battery coms features you can relax knowing any quality replacement battery pack of a suitable voltage and capacity should work fine.