Some links:
EBIKE-MTB article: Is it legal to build your own eMTB? All the most important information and legislation regarding DIY ebikes | E-MOUNTAINBIKE Magazine
CE marking (for EU): CE marking – obtaining the certificate, EU requirements
UKCA marking (for GB): Using the UKCA marking...