Here's a list of the iMovie supported video formats. It does support AVCHD although I don't see XAVC S 4k or XAVC S listed.
About incompatible media in iMovie for macOS – Apple Support (AU)
You can try importing the vids to your desktop and then using the free download, Handbrake, to convert them by default to H.264, Mp4/AAC that is compatible with iMovie.
You can get Handbrake here:
https://handbrake.fr/
A simple way to do it is to open Handbrake and do a File/Open Source. Navigate to your video and choose it as the source from the resulting screen. Then do File/Start Encoding. Wait a couple of minutes for the conversion to complete. Then save and import the converted clip into iMovie.
-- Rich