I was able to get this to work as an example. You have to retrieve the image as a blob, then insert the blob into the Doc. If you want to add the url, you can add that to the last line
async function addImage() {
const tempImage = await UrlFetchApp.fetch(url)
const image = tempImage.getBlob();
const docBody = DocumentApp.getActiveDocument().getBody()
const inlineImage = docBody.appendImage(image);
inlineImage.setHeight(300).setWidth(200); //.setLinkUrl(url)
}