there might be a bottle neck in your data flow, either you have one of the storage locations (cahce, media, etc..) is set to a slow external drive or a cloud drive, causing "the lag".
heres a quick (non exhaustive) trouble shoot workflow :
1- check for updates, lingering updates (system or FCPX) can cause slowing down - update and restart. (just be aware that if you update FCPX, you wont be able to use libraries thereon, on older versions of FCPX on other Macs - just something to consider)
2- check storage locations - are backups on the cloud, is your footage on a slow, full, fragmented, or not-ideal formatted drive, slow usb cable ?
on the app store, download Blackmagic Disk Speed test > set your target drive to your footage source and use 5gb to circumvent any cache on the drive. the read out will tell you if your drive is likely suitable for the project you are working on. if not, consider trying different cables (thunderbolt) and test again. however, if it is the drive itself which is struggling to keep up, copy your files to a faster drive and relink them in the project.
hope it works for you.